Balanced Xp gains
This commit is contained in:
parent
e89a44d8a1
commit
2756425cba
|
|
@ -56,7 +56,7 @@ AnimationClip:
|
|||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.51666665
|
||||
value: -959.6
|
||||
value: -1299
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
|
|
@ -128,7 +128,7 @@ AnimationClip:
|
|||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.51666665
|
||||
value: -959.6
|
||||
value: -1299
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
|
|
|
|||
|
|
@ -10529,7 +10529,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 441454879}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
|
@ -49752,7 +49752,6 @@ RectTransform:
|
|||
- {fileID: 1941152342}
|
||||
- {fileID: 1934107603}
|
||||
- {fileID: 691544515}
|
||||
- {fileID: 1812220812}
|
||||
- {fileID: 99594037}
|
||||
- {fileID: 1919109986}
|
||||
m_Father: {fileID: 2017681090}
|
||||
|
|
@ -193956,13 +193955,13 @@ RectTransform:
|
|||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 441454879}
|
||||
m_RootOrder: 4
|
||||
m_Father: {fileID: 1941152342}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 139.17798, y: 0.27972412}
|
||||
m_SizeDelta: {x: 14.659, y: -117}
|
||||
m_AnchoredPosition: {x: 0, y: -0.000061035156}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!114 &1812220813
|
||||
MonoBehaviour:
|
||||
|
|
@ -205793,7 +205792,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 2.1, y: 3.64, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 441454879}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
|
@ -208063,6 +208062,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 2037835091}
|
||||
- {fileID: 1812220812}
|
||||
m_Father: {fileID: 441454879}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
@ -208118,7 +208118,7 @@ MonoBehaviour:
|
|||
m_MinValue: 0
|
||||
m_MaxValue: 1
|
||||
m_WholeNumbers: 0
|
||||
m_Value: 1
|
||||
m_Value: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
|
|
|
|||
|
|
@ -16,4 +16,9 @@ MonoBehaviour:
|
|||
levels:
|
||||
- level: 1
|
||||
stats: []
|
||||
price: 1000
|
||||
xpGain: 2000
|
||||
description: This is just a Generic Building
|
||||
collectable: 0
|
||||
resourceType: 0
|
||||
productinoRates: []
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ MonoBehaviour:
|
|||
- name: Energy
|
||||
value: 50
|
||||
price: 10000
|
||||
xpGain: 50
|
||||
xpGain: 120
|
||||
- level: 2
|
||||
stats:
|
||||
- name: Stat 1
|
||||
|
|
@ -33,7 +33,7 @@ MonoBehaviour:
|
|||
- name: Energy
|
||||
value: 500
|
||||
price: 15000
|
||||
xpGain: 175
|
||||
xpGain: 5000
|
||||
description: This is the Hall (Main Hall)
|
||||
collectable: 0
|
||||
resourceType: 0
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ MonoBehaviour:
|
|||
- name: Production rate
|
||||
value: 10%
|
||||
price: 8500
|
||||
xpGain: 50
|
||||
xpGain: 2000
|
||||
description: This is a Rocket Repair
|
||||
collectable: 0
|
||||
resourceType: 0
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ MonoBehaviour:
|
|||
- name: Power
|
||||
value: 10
|
||||
price: 7900
|
||||
xpGain: 100
|
||||
xpGain: 2500
|
||||
description: This is a Moon Minerals Mine
|
||||
collectable: 1
|
||||
resourceType: 0
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ MonoBehaviour:
|
|||
- name: Power
|
||||
value: 2
|
||||
price: 20000
|
||||
xpGain: 100
|
||||
xpGain: 2000
|
||||
description: This is an Oxygen Mine
|
||||
collectable: 1
|
||||
resourceType: 1
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ MonoBehaviour:
|
|||
- name: Something else
|
||||
value: 40 %
|
||||
price: 12500
|
||||
xpGain: 150
|
||||
xpGain: 2000
|
||||
- level: 2
|
||||
stats:
|
||||
- name: Power
|
||||
|
|
@ -33,7 +33,7 @@ MonoBehaviour:
|
|||
- name: Something else
|
||||
value: 80 %
|
||||
price: 22500
|
||||
xpGain: 280
|
||||
xpGain: 5000
|
||||
description: This is a Research Lab
|
||||
collectable: 0
|
||||
resourceType: 0
|
||||
|
|
|
|||
|
|
@ -133,8 +133,11 @@ public class DBmanager : MonoBehaviour
|
|||
// i
|
||||
// }
|
||||
|
||||
level = 1 + (Mathf.Sqrt((float)xp / 100f));
|
||||
Debug.Log("Level : " + (float)xp / 100f + " : " + level);
|
||||
level = (Mathf.Sqrt((float)Mathf.Clamp(xp,100,float.PositiveInfinity) / 100f));
|
||||
if(level == LevelInt){
|
||||
level-=0.1f;
|
||||
}
|
||||
Debug.Log("Level : " + (float)xp / 100f + " : " + level + " : " + LevelInt);
|
||||
GameManagerInstance.gameManager.RefreshData();
|
||||
OnStateChanged.Invoke();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class GameManager : MonoBehaviour
|
|||
levelTxt.text = Mathf.CeilToInt(DBmanager.Level).ToString();
|
||||
|
||||
float levelExcess = DBmanager.Level - Mathf.FloorToInt(DBmanager.Level);
|
||||
levelSlider.value = levelExcess;
|
||||
levelSlider.value = Mathf.Clamp(levelExcess, 0.1f,1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user