void changeTimerTime(float newTime) { if (timer == null) { timer = GameObject.FindGameObjectWithTag("Timer").GetComponent <changeTimerTime> (); } timer.ChangeTime(newTime); }
private void Awake() { /* * MultiplayerEventManager.NextPhase += NextPhase; * MultiplayerEventManager.AllowCurrentPlayerToMove += AllowCurrentPlayerToMove; * MultiplayerEventManager.DisallowCurrentPlayerToMove += DisallowCurrentPlayerToMove; * MultiplayerEventManager.AllowCurrentPlayerToFire += AllowCurrentPlayerToFire; * MultiplayerEventManager.DisallowCurrentPlayerToFire += DisallowCurrentPlayerToFire; * MultiplayerEventManager.NextPlayer += NextPlayer; * MultiplayerEventManager.PlayerDead += PlayerDead; * MultiplayerEventManager.PlayerWon += PlayerWon; * Instantiate (HUD); */ currentPlayer = 0; phase = 0; currentPlayerHud = GameObject.FindGameObjectWithTag("CurrentPlayerHud").GetComponent <Text> (); currentPhaseHud = GameObject.FindGameObjectWithTag("CurrentPhaseHud").GetComponent <Text> (); timer = GameObject.FindGameObjectWithTag("Timer").GetComponent <changeTimerTime> (); winMenu = GameObject.FindGameObjectWithTag("WinMenu"); winMenu.SetActive(false); }