void OnClickGameOverMenu(MENU_GAMEOVER gameOverMenu) { switch (gameOverMenu) { case MENU_GAMEOVER.MAINMENU: // Save Memory Shards.. GameConfigs.SetCurrentMemoryShards(PlayerStatus.CurrentMemoryShards); SoundManager.PlayOneShotSound(SoundContainer.Instance().SoundEffectsDic[GameStatics.sound_select], SoundContainer.Instance().SoundEffectsDic[GameStatics.sound_select].clip); break; case MENU_GAMEOVER.RETRY: // Save Memory Shards.. GameConfigs.SetCurrentMemoryShards(PlayerStatus.CurrentMemoryShards); SoundManager.PlayOneShotSound(SoundContainer.Instance().SoundEffectsDic[GameStatics.sound_select], SoundContainer.Instance().SoundEffectsDic[GameStatics.sound_select].clip); break; case MENU_GAMEOVER.REVIVE_SHARDS: if (PlayerStatus.RemainReviveCount > 0) { Vibration.Vibrate(100); PlayerStatus.CurrentMemoryShards -= TopMostControl.Instance().GetRequiredShardsForRevive(); PlayerStatus.CurrentHP = PlayerStatus.MaxHP; PlayerStatus.RemainReviveCount -= 1; TopMostControl.Instance().StartGlobalLightEffect(Color.yellow, 2f, 0.2f); TopMostControl.Instance().GameOver(false); if (cameraController != null) { cameraController.CameraShake_Rot(3); } EffectManager.GetInstance().playEffect(playerController.GetPlayerRigidBody().transform.position, EFFECT.YELLOW_PILLAR, Vector2.zero); TopMostControl.Instance().StartBGM(SceneManager.GetActiveScene()); SoundManager.PlayOneShotSound(SoundContainer.Instance().SoundEffectsDic[GameStatics.sound_revive], SoundContainer.Instance().SoundEffectsDic[GameStatics.sound_revive].clip); Firebase.Analytics.FirebaseAnalytics.LogEvent(GameStatics.EVENT_REVIVE_SHARD); } break; case MENU_GAMEOVER.REVIVE_AD: GameManager.Instance().ShowReviveAds(); break; default: break; } }
void OnClickGameOverMenu(MENU_GAMEOVER menu) { switch (menu) { case MENU_GAMEOVER.MAINMENU: break; case MENU_GAMEOVER.RETRY: if (startDeathForUpgradeAct) { startDeathForUpgradeAct = false; } break; case MENU_GAMEOVER.REVIVE_SHARDS: break; case MENU_GAMEOVER.REVIVE_AD: break; default: break; } }