Пример #1
0
 void changeTimerTime(float newTime)
 {
     if (timer == null)
     {
         timer = GameObject.FindGameObjectWithTag("Timer").GetComponent <changeTimerTime> ();
     }
     timer.ChangeTime(newTime);
 }
Пример #2
0
 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);
 }