private IEnumerator PlayEnding(EEndGameType endBattleType) { ShowLoading(); yield return(new WaitForSeconds(loadingTime)); HideLoading(); switch (endBattleType) { case EEndGameType.BadEnding: L_DiagManager.instance.PlayStory("ending1"); isPlayingStory = true; curGameStat = EGameStat.Ending; break; case EEndGameType.HappyEnding: L_DiagManager.instance.PlayStory("ending2"); isPlayingStory = true; curGameStat = EGameStat.Ending; break; case EEndGameType.HiddenEnding: L_DiagManager.instance.PlayStory("ending3"); isPlayingStory = true; curGameStat = EGameStat.Ending; break; } }
public int GetGameStat(EGameStat argGameStat) { if (m_gameStats.ContainsKey(argGameStat)) { return(m_gameStats[argGameStat]); } else { return(0); } }
public void AddGameStat(EGameStat argGameStat, int argAmount) { if (m_gameStats.ContainsKey(argGameStat)) { m_gameStats[argGameStat] += argAmount; } else { m_gameStats.Add(argGameStat, argAmount); } }
private IEnumerator RestartCR() { ShowLoading(); yield return(new WaitForSeconds(loadingTime)); HideLoading(); nextLevelView.SetActive(false); PointInPool = 0f; soldierCount = 0; tankCount = 0; jetCount = 0; if (curGameStat == EGameStat.Story) { string shouldPlayStoryName = string.Empty; switch (curLevel) { case 1: shouldPlayStoryName = "story1"; gameOpenedType = 1; break; case 2: shouldPlayStoryName = "story2"; gameOpenedType = 2; break; case 3: shouldPlayStoryName = "story3"; gameOpenedType = 3; break; case 4: shouldPlayStoryName = "story4"; gameOpenedType = 3; SideHP = 250f; break; case 5: shouldPlayStoryName = "story5"; gameOpenedType = 3; SideHP = 350f; break; } L_DiagManager.instance.PlayStory(shouldPlayStoryName); isPlayingStory = true; curGameStat = EGameStat.Story; InitGame(); } }
private IEnumerator StartStoryModeCR() { ShowLoading(); yield return(new WaitForSeconds(loadingTime)); while (!L_DiagManager.instance.GetIsReady()) { yield return(null); } HideLoading(); curLevel = 1; gameOpenedType = 1; L_DiagManager.instance.PlayStory("story1"); isPlayingStory = true; curGameStat = EGameStat.Story; InitGame(); HideMainMenu(); }
public void ResetGame() { if (endStoryAndRetry) { endStoryAndRetry = false; curGameStat = EGameStat.Story; InitGame(); StartBattle(); } else { mainMenuOb.SetActive(true); PointInPool = 0f; soldierCount = 0; tankCount = 0; jetCount = 0; isPlayingStory = false; isStartBattle = false; curLevel = 1; curGameStat = EGameStat.MainMenu; } }
public void PlayStoryEnd() { curGameStat = EGameStat.Story; StartBattle(); }