示例#1
0
 string getName(HelperPlant plant)
 {
     if (!plantManager)
     {
         plantManager = PlantsManager.Instance;
     }
     return(JsonManager.Instance.getPlant(plant.type).name + "\n");
 }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     plantManager = PlantsManager.Instance;
     //init stats
     hudByProperty = new Dictionary <PlantProperty, OneStatHud>();
     foreach (var pair in plantManager.currentResource)
     {
         GameObject oneStatInstance = Instantiate(oneStatPrefab, statsContent.transform);
         OneStatHud oneStatHud      = oneStatInstance.GetComponent <OneStatHud>();
         hudByProperty[pair.Key] = oneStatHud;
     }
     //init plant buttons
     UpdatePlantButtons();
 }
示例#3
0
 // Start is called before the first frame update
 void Start()
 {
     plantManager = PlantsManager.Instance;
 }
示例#4
0
 // Start is called before the first frame update
 void Start()
 {
     plantManager = PlantsManager.Instance;
     gameObject.SetActive(false);
 }
 void Awake()
 {
     PlantsManagerInstance = this;
 }