Balanced Xp gains

This commit is contained in:
Sewmina
2022-04-28 02:58:07 +05:30
parent e89a44d8a1
commit 2756425cba
10 changed files with 28 additions and 20 deletions

View File

@@ -56,7 +56,7 @@ AnimationClip:
outWeight: 0.33333334 outWeight: 0.33333334
- serializedVersion: 3 - serializedVersion: 3
time: 0.51666665 time: 0.51666665
value: -959.6 value: -1299
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 136 tangentMode: 136
@@ -128,7 +128,7 @@ AnimationClip:
outWeight: 0.33333334 outWeight: 0.33333334
- serializedVersion: 3 - serializedVersion: 3
time: 0.51666665 time: 0.51666665
value: -959.6 value: -1299
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 136 tangentMode: 136

View File

@@ -10529,7 +10529,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 441454879} m_Father: {fileID: 441454879}
m_RootOrder: 5 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@@ -49752,7 +49752,6 @@ RectTransform:
- {fileID: 1941152342} - {fileID: 1941152342}
- {fileID: 1934107603} - {fileID: 1934107603}
- {fileID: 691544515} - {fileID: 691544515}
- {fileID: 1812220812}
- {fileID: 99594037} - {fileID: 99594037}
- {fileID: 1919109986} - {fileID: 1919109986}
m_Father: {fileID: 2017681090} m_Father: {fileID: 2017681090}
@@ -193956,13 +193955,13 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 441454879} m_Father: {fileID: 1941152342}
m_RootOrder: 4 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 139.17798, y: 0.27972412} m_AnchoredPosition: {x: 0, y: -0.000061035156}
m_SizeDelta: {x: 14.659, y: -117} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0.5} m_Pivot: {x: 0, y: 0.5}
--- !u!114 &1812220813 --- !u!114 &1812220813
MonoBehaviour: MonoBehaviour:
@@ -205793,7 +205792,7 @@ RectTransform:
m_LocalScale: {x: 2.1, y: 3.64, z: 1} m_LocalScale: {x: 2.1, y: 3.64, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 441454879} m_Father: {fileID: 441454879}
m_RootOrder: 6 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {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_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 2037835091} - {fileID: 2037835091}
- {fileID: 1812220812}
m_Father: {fileID: 441454879} m_Father: {fileID: 441454879}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -208118,7 +208118,7 @@ MonoBehaviour:
m_MinValue: 0 m_MinValue: 0
m_MaxValue: 1 m_MaxValue: 1
m_WholeNumbers: 0 m_WholeNumbers: 0
m_Value: 1 m_Value: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []

View File

@@ -16,4 +16,9 @@ MonoBehaviour:
levels: levels:
- level: 1 - level: 1
stats: [] stats: []
price: 1000
xpGain: 2000
description: This is just a Generic Building description: This is just a Generic Building
collectable: 0
resourceType: 0
productinoRates: []

View File

@@ -23,7 +23,7 @@ MonoBehaviour:
- name: Energy - name: Energy
value: 50 value: 50
price: 10000 price: 10000
xpGain: 50 xpGain: 120
- level: 2 - level: 2
stats: stats:
- name: Stat 1 - name: Stat 1
@@ -33,7 +33,7 @@ MonoBehaviour:
- name: Energy - name: Energy
value: 500 value: 500
price: 15000 price: 15000
xpGain: 175 xpGain: 5000
description: This is the Hall (Main Hall) description: This is the Hall (Main Hall)
collectable: 0 collectable: 0
resourceType: 0 resourceType: 0

View File

@@ -19,7 +19,7 @@ MonoBehaviour:
- name: Production rate - name: Production rate
value: 10% value: 10%
price: 8500 price: 8500
xpGain: 50 xpGain: 2000
description: This is a Rocket Repair description: This is a Rocket Repair
collectable: 0 collectable: 0
resourceType: 0 resourceType: 0

View File

@@ -21,7 +21,7 @@ MonoBehaviour:
- name: Power - name: Power
value: 10 value: 10
price: 7900 price: 7900
xpGain: 100 xpGain: 2500
description: This is a Moon Minerals Mine description: This is a Moon Minerals Mine
collectable: 1 collectable: 1
resourceType: 0 resourceType: 0

View File

@@ -21,7 +21,7 @@ MonoBehaviour:
- name: Power - name: Power
value: 2 value: 2
price: 20000 price: 20000
xpGain: 100 xpGain: 2000
description: This is an Oxygen Mine description: This is an Oxygen Mine
collectable: 1 collectable: 1
resourceType: 1 resourceType: 1

View File

@@ -23,7 +23,7 @@ MonoBehaviour:
- name: Something else - name: Something else
value: 40 % value: 40 %
price: 12500 price: 12500
xpGain: 150 xpGain: 2000
- level: 2 - level: 2
stats: stats:
- name: Power - name: Power
@@ -33,7 +33,7 @@ MonoBehaviour:
- name: Something else - name: Something else
value: 80 % value: 80 %
price: 22500 price: 22500
xpGain: 280 xpGain: 5000
description: This is a Research Lab description: This is a Research Lab
collectable: 0 collectable: 0
resourceType: 0 resourceType: 0

View File

@@ -133,8 +133,11 @@ public class DBmanager : MonoBehaviour
// i // i
// } // }
level = 1 + (Mathf.Sqrt((float)xp / 100f)); level = (Mathf.Sqrt((float)Mathf.Clamp(xp,100,float.PositiveInfinity) / 100f));
Debug.Log("Level : " + (float)xp / 100f + " : " + level); if(level == LevelInt){
level-=0.1f;
}
Debug.Log("Level : " + (float)xp / 100f + " : " + level + " : " + LevelInt);
GameManagerInstance.gameManager.RefreshData(); GameManagerInstance.gameManager.RefreshData();
OnStateChanged.Invoke(); OnStateChanged.Invoke();
} }

View File

@@ -44,7 +44,7 @@ public class GameManager : MonoBehaviour
levelTxt.text = Mathf.CeilToInt(DBmanager.Level).ToString(); levelTxt.text = Mathf.CeilToInt(DBmanager.Level).ToString();
float levelExcess = DBmanager.Level - Mathf.FloorToInt(DBmanager.Level); float levelExcess = DBmanager.Level - Mathf.FloorToInt(DBmanager.Level);
levelSlider.value = levelExcess; levelSlider.value = Mathf.Clamp(levelExcess, 0.1f,1);
} }
} }