public void FastRestart() { var persistence = ScenePersistence.Instance.Data as KOZAPersistence; persistence.FastRestart = true; //Fader.OnFadeToBlackFinished.AddListener(() => LevelManager.Instance.LoadLevel(persistence.LastLevelName)); LevelManager.Instance.LoadLevel(persistence.LastLevelName); AdvertisementController.HideBannerAd(); }
void OnDestroy() { EventManager.Unsubscribe <Event_Obstacle_Collided>(OnGoatHitObstacle); EventManager.Unsubscribe <Event_GoatDies>(OnGoatDie); EventManager.Unsubscribe <Event_AppleCollected>(OnAppleCollect); EventManager.Unsubscribe <Event_GameWin>(OnHitWinTrigger); EventManager.Unsubscribe <Event_StartDialogComplete>(OnDialogComplete); EventManager.Unsubscribe <Event_HelpScreenClosed>(OnHelpClosed); EventManager.Unsubscribe <Event_GoatYell>(OnGoatYell); EventManager.Unsubscribe <Event_SceneLoaded>(OnSceneLoaded); BoostWatcher.DeInit(); AdvertisementController.HideBannerAd(); }
void OnDestroy() { AdvertisementController.HideBannerAd(); }