//public GameObject GameManager; // Start is called before the first frame update void Start() { Audio2.Stop(); timeUP = false; RanMsg.SetActive(false); BossHP_txt.SetActive(false); setWorldStr(); SetupWorld(); gameHandler = GameObject.FindWithTag("GameController"); enemyHandler = GameObject.FindWithTag("EnemyHandler"); player = GameObject.FindWithTag("Player"); gameMode = gameHandler.GetComponent <ModeSelection>().getMode(); if (gameMode == 2) { topTextDisplay[1].text = "Inverse"; TimerBG.SetActive(false); Button btn = Ans1.GetComponent <Button>(); btn.onClick.AddListener(SelectedAns1Inverse); Button btn2 = Ans2.GetComponent <Button>(); btn2.onClick.AddListener(SelectedAns2Inverse); Button btn3 = Ans3.GetComponent <Button>(); btn3.onClick.AddListener(SelectedAns3Inverse); Button btn4 = Ans4.GetComponent <Button>(); btn4.onClick.AddListener(SelectedAns4Inverse); Button cfmbtn1 = cfmbtn.GetComponent <Button>(); cfmbtn1.onClick.AddListener(confirmAnsInverse); } else if (gameMode == 1) { topTextDisplay[1].text = "Time Attack"; Button btn = Ans1.GetComponent <Button>(); btn.onClick.AddListener(SelectedAns1); Button btn2 = Ans2.GetComponent <Button>(); btn2.onClick.AddListener(SelectedAns2); Button btn3 = Ans3.GetComponent <Button>(); btn3.onClick.AddListener(SelectedAns3); Button btn4 = Ans4.GetComponent <Button>(); btn4.onClick.AddListener(SelectedAns4); Button cfmbtn1 = cfmbtn.GetComponent <Button>(); cfmbtn1.onClick.AddListener(confirmAns); Button skill_btn1 = skill_btn.GetComponent <Button>(); skill_btn1.onClick.AddListener(skill); } else { topTextDisplay[1].text = "Normal"; TimerBG.SetActive(false); Button btn = Ans1.GetComponent <Button>(); btn.onClick.AddListener(SelectedAns1); Button btn2 = Ans2.GetComponent <Button>(); btn2.onClick.AddListener(SelectedAns2); Button btn3 = Ans3.GetComponent <Button>(); btn3.onClick.AddListener(SelectedAns3); Button btn4 = Ans4.GetComponent <Button>(); btn4.onClick.AddListener(SelectedAns4); Button cfmbtn1 = cfmbtn.GetComponent <Button>(); cfmbtn1.onClick.AddListener(confirmAns); Button skill_btn1 = skill_btn.GetComponent <Button>(); skill_btn1.onClick.AddListener(skill); } Alert.SetActive(false); Clear_Msg.SetActive(false); GameOver_MSG.SetActive(false); }
public void setBossTxt() { BossHP_txt.SetActive(true); topTextDisplay[3].text = "Boss HP : " + bossHP.ToString(); }