IEnumerator DisplayCall() { yield return(new WaitForSeconds(sec)); RanMsg.SetActive(false); gameHandler.GetComponent <ReadMCQ>().nextQns(); if (isPlayerDead) { GameOver_MSG.SetActive(true); } else if (isGameEnd) { Clear_Msg.SetActive(true); //put method and go back to world selection } else if (!isGameEnd) { Ans1Sel = false; Ans2Sel = false; Ans3Sel = false; Ans4Sel = false; Ans1.GetComponent <TextBG>().Unselectedbtn(); Ans2.GetComponent <TextBG>().Unselectedbtn(); Ans3.GetComponent <TextBG>().Unselectedbtn(); Ans4.GetComponent <TextBG>().Unselectedbtn(); MCQ_UI.SetActive(true); timeUP = false; timeAtkMode = timeAtkMode1; } }
IEnumerator DisplayRanMsg() { yield return(new WaitForSeconds(1.5f)); RanMsg.SetActive(true); }
//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); }