예제 #1
0
 private void OnEnable()
 {
     // Subscribing to global events
     foreach (var playerData in _PlayerDatas)
     {
         playerData.PlayerDeathEvent.AddListenerToEvent(OnMatchOver);
     }
     _GameTimerOverEvent.AddListenerToEvent(OnMatchOver);
 }
예제 #2
0
 public override void Initialize()
 {
     _Player1DeathEvent.AddListenerToEvent(OnPlayer1Death);
     _Player2DeathEvent.AddListenerToEvent(OnPlayer2Death);
     _GameTimerOverEvent.AddListenerToEvent(OnGameTimerOver);
 }