Exemplo n.º 1
0
    protected virtual void OnGameEnd(CharacterInfo winner, CharacterInfo loser)
    {
        this.isRunning = false;

        if (UFE.gameMode == GameMode.VersusMode ||
            UFE.gameMode == GameMode.NetworkGame)
        {
            UFE.StartVersusModeAfterBattleScreen();
        }
        else if (UFE.gameMode == GameMode.StoryMode)
        {
            if (winner == this.player1.character)
            {
                UFE.WonStoryModeBattle();
            }
            else
            {
                UFE.StartStoryModeContinueScreen();
            }
        }
        else
        {
            UFE.StartMainMenuScreen();
        }
    }
Exemplo n.º 2
0
 public virtual void GoToMainMenuScreen()
 {
     NodeControl[] temp = GameObject.FindObjectsOfType <NodeControl>();
     for (int i = 0; i < temp.Length; i++)
     {
         temp[i].deleteLine();
     }
     UFE.StartMainMenuScreen();
 }
 public override void SelectOption(int option, int player)
 {
     VersusModeAfterBattleScreen.Option selectedOption = (VersusModeAfterBattleScreen.Option)option;
     if (selectedOption == VersusModeAfterBattleScreen.Option.CharacterSelectionScreen)
     {
         UFE.StartCharacterSelectionScreen();
     }
     else if (selectedOption == VersusModeAfterBattleScreen.Option.MainMenu)
     {
         UFE.StartMainMenuScreen();
     }
     else if (selectedOption == VersusModeAfterBattleScreen.Option.StageSelectionScreen)
     {
         UFE.StartStageSelectionScreen();
     }
     else if (selectedOption == VersusModeAfterBattleScreen.Option.RepeatBattle)
     {
         UFE.StartLoadingBattleScreen();
     }
 }
Exemplo n.º 4
0
 protected void OpenMenuAfterBattle()
 {
     if (UFE.gameMode == GameMode.VersusMode || UFE.gameMode == GameMode.ChallengeMode || UFE.gameMode == GameMode.NetworkGame)
     {
         UFE.StartVersusModeAfterBattleScreen();
     }
     else if (UFE.gameMode == GameMode.StoryMode)
     {
         if (this.player1.winner)
         {
             UFE.WonStoryModeBattle();
         }
         else
         {
             UFE.StartStoryModeContinueScreen();
         }
     }
     else
     {
         UFE.StartMainMenuScreen();
     }
 }
Exemplo n.º 5
0
 public virtual void GoToMainMenu()
 {
     UFE.StartMainMenuScreen();
 }
Exemplo n.º 6
0
 public virtual void GoToMainMenuScreen()
 {
     this.StopSearchingMatchGames();
     UFE.StartMainMenuScreen();
 }
 protected void GoToMainMenuScreen()
 {
     this.closing = true;
     UFE.StartMainMenuScreen();
 }
Exemplo n.º 8
0
 public virtual void GoToMainMenu()
 {
     UFE.PauseGame(false);
     UFE.StartMainMenuScreen();
 }
Exemplo n.º 9
0
 public virtual void GoToMainMenuScreen()
 {
     this.StopSearchingMatchGames();
     //UFE.EnsureNetworkDisconnection();
     UFE.StartMainMenuScreen();
 }
Exemplo n.º 10
0
    protected virtual void OnGameEnd(CharacterInfo winner, CharacterInfo loser)
    {
        this.isRunning = false;
        if (UFE.gameMode == GameMode.VersusMode)
        {
            UFE.updatedLifePoints = UFE.config.player1Character.currentLifePoints;
            string level_fgt = PlayerPrefs.GetString("LEVEL");
            if (winner == this.player1.character)
            {
                // HANUMAN
                PlayerPrefs.SetInt("FIGHTTAGBOOL", 200);
                int Fightabc = PlayerPrefs.GetInt("FIGHTTAG");
                if (Fightabc == 3 && level_fgt.Equals("LEVELII"))
                {
                    PlayerPrefs.SetInt("LankiniFight", 3);
                }
                else if (Fightabc == 4 && level_fgt.Equals("LEVELII"))
                {
                    PlayerPrefs.SetInt("LankiniFight", 2);
                }
                else if (Fightabc == 1 && level_fgt.Equals("LEVELIII"))
                {
                    PlayerPrefs.SetInt("LankiniFight", 4);
                }
                else
                {
                    PlayerPrefs.SetInt("LankiniFight", 0);
                }

                Fightabc = Fightabc + 1;
                if (Fightabc == 5)
                {
                    PlayerPrefs.SetString("LEVEL", "LEVELII");
                    PlayerPrefs.SetInt("FIGHTTAG", 0);
                }
                else
                {
                    TileManager.FIGHTTAG = Fightabc;
                    PlayerPrefs.SetInt("FIGHTTAG", TileManager.FIGHTTAG);
                }
            }
            else
            {
                // SKELETON

                PlayerPrefs.SetInt("FIGHTTAGBOOL", 100);
                int Fightabc2 = PlayerPrefs.GetInt("FIGHTTAG");
                if (Fightabc2 == 4 && level_fgt.Equals("LEVELII"))
                {
                    PlayerPrefs.SetInt("LankiniFight", 1);
                }
                else
                {
                    PlayerPrefs.SetInt("LankiniFight", 0);
                }
                TileManager.FIGHTTAG = Fightabc2;
                PlayerPrefs.SetInt("FIGHTTAG", TileManager.FIGHTTAG);
            }
            float Lankacount = PlayerPrefs.GetFloat("AIMIII");
            if (PlayerPrefs.GetString("LEVEL").Equals("LEVELI"))
            {
                Lankacount = (Lankacount / 4f);
            }
            else if (PlayerPrefs.GetString("LEVEL").Equals("LEVELII") || PlayerPrefs.GetString("LEVEL").Equals("LEVELIII"))
            {
                Lankacount = (Lankacount / 2f);
            }

            PlayerPrefs.SetFloat("enemyDistance", Lankacount);
            PlayerPrefs.SetFloat("HEALTH", UFE.updatedLifePoints);
            UFE.StartVersusModeAfterBattleScreen();
        }
        else if (UFE.gameMode == GameMode.StoryMode)
        {
            if (winner == this.player1.character)
            {
                UFE.WonStoryModeBattle();
            }
            else
            {
                UFE.StartStoryModeContinueScreen();
            }
        }
        else
        {
            UFE.StartMainMenuScreen();
        }
    }