private void Update() { if ((Input.anyKeyDown || !NeedPressKey) && currentText.GetComponent <CanvasGroup>().alpha == 1) { currentText.GetComponent <Fade>().CanFade = true; if (nextText != null) { StartCoroutine(NextText()); } else { if (systemController != null) { systemController.LoadScene(Level); } if (Board != null && Board.GetComponent <CanvasGroup>().alpha == 1) { Board.GetComponent <Fade>().CanFade = true; } if (Player != null && NeedPressKey) { Player.GetComponent <PlayerController>().CanMove = true; Player.GetComponent <PlayerUnit>().LoseEnergy = true; } } } }
void Update() { if (Input.anyKeyDown) { PlayerPrefs.SetInt("Reload", 0); PlayerPrefs.SetInt("Revive Point", -1); systemController.LoadScene(6); } }