Ejemplo n.º 1
0
    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;
        }
    }
Ejemplo n.º 2
0
 public int GetGameStat(EGameStat argGameStat)
 {
     if (m_gameStats.ContainsKey(argGameStat))
     {
         return(m_gameStats[argGameStat]);
     }
     else
     {
         return(0);
     }
 }
Ejemplo n.º 3
0
 public void AddGameStat(EGameStat argGameStat, int argAmount)
 {
     if (m_gameStats.ContainsKey(argGameStat))
     {
         m_gameStats[argGameStat] += argAmount;
     }
     else
     {
         m_gameStats.Add(argGameStat, argAmount);
     }
 }
Ejemplo n.º 4
0
    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();
        }
    }
Ejemplo n.º 5
0
    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();
    }
Ejemplo n.º 6
0
 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;
     }
 }
Ejemplo n.º 7
0
 public void PlayStoryEnd()
 {
     curGameStat = EGameStat.Story;
     StartBattle();
 }