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