private void GetUIComponents() { gamePanel = transform.GetChild(0).gameObject; pausePanel = transform.GetChild(1).gameObject; titlePanel = transform.GetChild(2).gameObject; gameOverPanel = transform.GetChild(3).gameObject; howToPlay = transform.GetChild(2).GetChild(2).gameObject; titlePanel.SetActive(true); gamePanel.SetActive(true); pausePanel.SetActive(true); gameOverPanel.SetActive(true); foodPanel = GameObject.Find("FoodAlternativeButtons").gameObject; happinessText = GameObject.Find("Happiness_NumberText").GetComponent <TMP_Text>(); hungerText = GameObject.Find("Hunger_NumberText").GetComponent <TMP_Text>(); staminaText = GameObject.Find("Stamina_NumberText").GetComponent <TMP_Text>(); villageEXPText = GameObject.Find("Village-EXP_NumberText").GetComponent <TMP_Text>(); villageLevelText = GameObject.Find("Village-EXP_LevelText").GetComponent <TMP_Text>(); villageHealthText = GameObject.Find("Village-Health_NumberText").GetComponent <TMP_Text>(); appleCountText = foodPanel.transform.GetChild(0).GetChild(0).GetComponent <TMP_Text>(); chickenCountText = foodPanel.transform.GetChild(1).GetChild(0).GetComponent <TMP_Text>(); happinessImage = GameObject.Find("Happiness_BarFilling").GetComponent <Image>(); hungerImage = GameObject.Find("Hunger_BarFilling").GetComponent <Image>(); staminaImage = GameObject.Find("Stamina_BarFilling").GetComponent <Image>(); villageEXPImage = GameObject.Find("Village-EXP_BarFilling").GetComponent <Image>(); villageHealthImage = GameObject.Find("Village-Health_BarFilling").GetComponent <Image>(); curagon = GameObject.FindGameObjectWithTag("Player").GetComponent <Curagon>(); particleStats = new ParticleStats[3]; particleStats[0] = GameObject.Find("Happiness-Particle-Effect_Stats").GetComponent <ParticleStats>(); particleStats[1] = GameObject.Find("Hunger-Particle-Effect_Stats").GetComponent <ParticleStats>(); particleStats[2] = GameObject.Find("Stamina-Particle-Effect_Stats").GetComponent <ParticleStats>(); titlePanel.SetActive(false); gamePanel.SetActive(false); pausePanel.SetActive(false); }
public void SetCuragon(Curagon newCuragon) { curagon = newCuragon; }
void GetAllComponents() { curagon = GameObject.FindGameObjectWithTag("Player").GetComponent <Curagon>(); }