private void GameWin() { closeUILoss = true; UIStatus.SetActive(false); UIEnd.SetActive(true); textWorL.text = "WINNER"; textResult.text = "YOUR POINT IS: " + point; StartCoroutine(Wait(7, 0)); start = false; }
public override void Initialize(params object[] arguments) { finalSpell = (Spell)arguments[0]; targetSpell = (Spell)arguments[1]; success = (bool)arguments[2]; base.Initialize(); uiEnd = UIManager.instance.SwitchScreen <UIEnd>(); uiEnd.current.color = Utils.GetColor(finalSpell.hue % 360f, finalSpell.lightness % 100f); uiEnd.target.color = Utils.GetColor(targetSpell.hue % 360f, targetSpell.lightness % 100f); uiEnd.tryAgainButton.onClick.AddListener(OnTryAgain); uiEnd.ShowColors(OnColorsShown); }
private void Restart() { timeStart = 0; StartCoroutine(Wait(9, 0)); index = 8; StartCoroutine(MoveCam()); StartCoroutine(Wait(0, 3)); StartCoroutine(Wait(1, 15)); UIEnd.SetActive(false); UIDoor.SetActive(true); point = 0; time = 80; closeUILoss = false; for (int j = 0; j < 8; j++) { if (checkQuestion[j] == 1) { checkQuestion[j] = 0; } } GoOrNot(); }
private void GameLoss() { if (Time.time == 80 + Mathf.Round(timeStart)) { if (!closeUILoss) { UIQuestion.SetActive(false); UIStatus.SetActive(false); UIEnd.SetActive(true); textWorL.text = "LOSER"; textResult.text = "YOUR POINT IS: " + point; StartCoroutine(Wait(6, 0)); start = false; } } else if (Time.time >= 80 + Mathf.Round(timeStart)) { if (word == "Restart") { Restart(); word = ""; } } }