no changes
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user