コード例 #1
0
 void Start()
 {
     //script refs
     animalFoodButton = GameObject.Find("FoodUpgradeMaster").GetComponent <AnimalFoodButton>();
     animalHabButton  = GameObject.Find("HabitatUpgradeMaster").GetComponent <AnimalHabitatButtons>();
     animalPopButton  = GameObject.Find("PopulationUpgradeMaster").GetComponent <AnimalSocialButton>();
 }
コード例 #2
0
 void Start()
 {
     //default happiness numbers
     foodHappiness   = 35;
     maintHappiness  = 20;
     socialHappiness = 5;
     //get animal happiness reference
     animalHap          = this.GetComponent <AnimalHappiness>();
     animalFoodButton   = GameObject.Find("FoodUpgradeMaster").GetComponent <AnimalFoodButton>();
     animalSocialButton = GameObject.Find("PopulationUpgradeMaster").GetComponent <AnimalSocialButton>();
     animalHabButton    = GameObject.Find("HabitatUpgradeMaster").GetComponent <AnimalHabitatButtons>();
 }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     animalSocialButtons = this.GetComponent <AnimalSocialButton>();
 }