// Start is called before the first frame update void Start() { Time.timeScale = 1; EL1 = false; EL2 = false; EL3 = false; EL4 = false; EL5 = false; EL6 = false; EL7 = false; EL8 = false; EL9 = false; EL10 = false; EL11 = false; EL12 = false; EL13 = false; EL14 = false; EL15 = false; EL16 = false; EL17 = false; EL18 = false; EL19 = false; EL20 = false; EL21 = false; EL22 = false; PanelLose.SetActive(false); PanelWin.SetActive(false); }
public void OpenLoseScreen() { Time.timeScale = 1f; PanelWin.SetActive(false); PanelLose.SetActive(true); JoystickCanvas.SetActive(false); minimap.SetActive(false); }
public void OpenWinScreen() { Time.timeScale = 1f; winText.text = "Parabéns, você salvou " + GameObject.Find("Player").GetComponent <Player>().money + " ovos de tartarugas!\n" + winText.text; PanelWin.SetActive(true); PanelLose.SetActive(false); JoystickCanvas.SetActive(false); minimap.SetActive(false); }
// Update is called once per frame public void LateUpdate() { if (EL1 == true && EL2 == true && EL3 == true && EL4 == true && EL5 == true && EL6 == true && EL7 == true && EL8 == true && EL9 == true && EL10 == true && EL11 == true && EL12 == true && EL13 == true && EL14 == true) { PanelWin.SetActive(true); Time.timeScale = 0; } else if (timeLeft <= 0) { PanelLose.SetActive(true); Time.timeScale = 0; } }
// Start is called before the first frame update void Start() { timer.GetComponent <Text>(); timer.GetComponent <Text>(); EL1 = false; EL2 = false; EL3 = false; EL4 = false; EL5 = false; EL6 = false; EL7 = false; EL8 = false; EL9 = false; EL10 = false; EL11 = false; EL12 = false; EL13 = false; EL14 = false; PanelLose.SetActive(false); PanelWin.SetActive(false); }