no changes

This commit is contained in:
Lorenzo
2022-04-11 17:39:52 +02:00
parent 50162171d6
commit bc0601ecf8
5 changed files with 749 additions and 852 deletions

View File

@@ -1561,7 +1561,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 417.81, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 90}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &16466549
@@ -125062,6 +125062,7 @@ MonoBehaviour:
descriptionTxt: {fileID: 503357262}
upgradeMenu: {fileID: 381659749}
upgrade_statParent: {fileID: 1524033405}
price_statParent: {fileID: 114207908}
--- !u!4 &1259898503 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4322694313257492, guid: 5b7c91a625e35744c9263b8194bb306c, type: 3}
@@ -186188,7 +186189,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 788.45, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 90}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &1934658493

View File

@@ -17,10 +17,12 @@ public class BuildingData : ScriptableObject
public class BuildingStat{
public string name;
public string value;
public BuildingStat(string _name, string _value){
name= _name;
value = _value;
}
}
@@ -29,8 +31,12 @@ public class BuildingLevel{
public int level = 0;
public List<BuildingStat> stats;
public BuildingLevel(int _level, List<BuildingStat> _stats){
level = _level;
stats = _stats;
}
}

View File

@@ -16,6 +16,8 @@ public class SelectedItemMenu : MonoBehaviour
[Header("upgrade menu")]
public GameObject upgradeMenu;
public Transform upgrade_statParent;
public Transform price_statParent;
void Start()
{
@@ -59,6 +61,9 @@ public class SelectedItemMenu : MonoBehaviour
{
upgrade_statParent.GetChild(i).GetChild(0).GetComponent<TMP_Text>().text = stats[i].name;
upgrade_statParent.GetChild(i).GetChild(1).GetComponent<TMP_Text>().text = stats[i].value;
// price_statParent.GetChild(1).GetComponent<TMP_Text>().text = stats[i].price;
Debug.Log(price_statParent);
}
}
if (upgrade_statParent.childCount > stats.Count)