public void ShowUpgradeUI(bool isShow) { if (isShow) { GameConfigs.SetCurrentMemoryShards(PlayerManager.Instance().PlayerStatus.CurrentMemoryShards); upgradeUITweener.gameObject.SetActive(true); upgradeUITweener.startingVector = outXPos_upgradeUI; upgradeUITweener.endVector = inXPos_upgradeUI; SetUpgradeInfos(upgradeElements); Vibration.Vibrate(100); SoundManager.StopAllLoopingSounds(); if (onCameraShake != null) { onCameraShake(5); } } else { upgradeUITweener.startingVector = inXPos_upgradeUI; upgradeUITweener.endVector = outXPos_upgradeUI; upgradeUITweener.TweenCompleted += DeactiveUpgradeUIAfterTweenComplete; currentGameUIStatus = TOPUI_STATUS.NORMAL; } isShowingUpgradeUI = isShow; upgradeUITweener.Begin(); upgradeUITweener.defaultVector = upgradeUITweener.startingVector; }
public void GameOver(bool isShow) { ShowUpgradeUI(isShow); if (PlayerManager.Instance().PlayerStatus.RemainReviveCount > 0) { if (isShow) { if ((PlayerManager.Instance().PlayerStatus.CurrentMemoryShards / 2) > 0) { NoMoreRevivePanel.SetActive(false); } else { NoMoreRevivePanel.SetActive(true); } ShowSecondWind(true); } else { ShowSecondWind(false); } } else { NoMoreRevivePanel.SetActive(true); ShowSecondWind(false); } if (isShow) { currentGameUIStatus = TOPUI_STATUS.GAMEOVER; } else { currentGameUIStatus = TOPUI_STATUS.NORMAL; } }