/// <summary> /// Unregister events /// </summary> private void UnRegisterEvent() { EventHub.Unbind <EventUpdateScore>(OnScoreUpdate); EventHub.Unbind <EventGameTimeUpdate>(OnGameTimeUpdate); EventHub.Unbind <EventEndGame>(OnEndGame); EventHub.Unbind <EventCharacterPassLayer>(ShowFishesEscapeEffect); EventHub.Unbind <EventPedestalLayerDestroy>(ShowPedestalLayerDestroyEffect); EventHub.Unbind <EventGetBonusTime>(ShowBonusTimeEffect); EventHub.Unbind <EventRevive>(OnRevive); }
void OnDestroy() { EventHub.Unbind <EventStartGame>(OnStartGame); }