public IEnumerator EndPhase() { GameManager.Player.GetComponent <PlayerController>().hasControl = false; for (int i = 0; i < 50; i++) { colorGrading.brightness.value -= 1f; yield return(new WaitForSeconds(.1f)); } yield return(new WaitForSeconds(2f)); OnPhaseEnd.Invoke(); }
private IEnumerator _EndPhase() { lastPhase = currentPhase; currentPhase = Phase.None; yield return(new WaitForSeconds(1)); OnPhaseEnd?.Invoke(); NextPhase(); Debug.Log(currentPhase + " phase"); OnPhaseStart?.Invoke(); }