void StartGame() { m_state = TappyGameState.Playing; m_player.Run(); m_obstacles.Run(); m_bonusPoints.Run(); m_hud.Play(); Services.Get <MobileAnalyticsBehavior>().RecordCustomEvent("StartLevel", null, null); }
void StopGame() { m_state = TappyGameState.PostGame; m_player.Stop(); m_obstacles.Stop(); m_bonusPoints.Stop(); m_sky.Stop(); m_ground.Stop(); OutroDialog outro = Services.Get <UIManager>().PushScreen(UIScreenType.OutroDialog, new OutroArgs(m_score)) as OutroDialog; outro.PlayButtonClickedEvent += HandlePlayButtonClickedEvent; outro.LeaderboardsButtonClickedEvent += HandleLeaderboardsButtonClickedEvent; outro.StoreButtonClickedEvent += HandleStoreButtonClickedEvent; }
void StartPreGame() { m_state = TappyGameState.PreGame; if (m_currentPlayerId != Services.Get <PlaneManager>().GetCurrentPlaneId()) { CreatePlayer(); } m_score = 0; m_sky.Run(); m_ground.Run(); m_player.Pause(); m_hud.ShowGetReady(); Services.Get <UIManager>().PopScreen(); }