Scriptable Objects + Upgrade Menu

This commit is contained in:
Sewmina
2022-04-05 03:42:52 +05:30
parent c5c5693078
commit 525d1da14a
18 changed files with 1283 additions and 758 deletions

View File

@@ -4,7 +4,7 @@ using UnityEngine;
public class Building : MonoBehaviour
{
public string buildingName;
public BuildingData buildingData;
public Outline outline;
void Awake(){
@@ -17,21 +17,8 @@ public class Building : MonoBehaviour
if(Selector.selectedBuilding == null){outline.enabled=false; return;}
outline.enabled = Selector.selectedBuilding == this;
Debug.Log(buildingName); // this function debugs 4 names and not always the one u clicked.
// SetRightUpgradeButton(); // function to let the button know what menu to open, also runs 4+ times.
// Debug.Log(buildingName);
}
/* void SetRightUpgradeButton(){
switch (buildingName)
{
case "Research Facility":
Debug.Log("research facility menu");
break;
case "Green House":
Debug.Log("green house menu");
break;
}
} */
/* */
}