Scriptable Objects + Upgrade Menu
This commit is contained in:
@@ -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;
|
||||
}
|
||||
} */
|
||||
/* */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user