void Start() { //script refs animalFoodButton = GameObject.Find("FoodUpgradeMaster").GetComponent <AnimalFoodButton>(); animalHabButton = GameObject.Find("HabitatUpgradeMaster").GetComponent <AnimalHabitatButtons>(); animalPopButton = GameObject.Find("PopulationUpgradeMaster").GetComponent <AnimalSocialButton>(); }
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>(); }
// Use this for initialization void Start() { animalSocialButtons = this.GetComponent <AnimalSocialButton>(); }