示例#1
0
 void ActivateEasterEgg()
 {
     GameConsole.AddMessage("PonyKombat® by Astapenko P.I. BSUIR 2019", false, false);
     StopAllCoroutines();
     Derpy.SetActive(true);
     m_GameUI.ShowAchievement(1);
     StartCoroutine(HideEasterEgg());
 }
示例#2
0
 void UserCommandsReaction(string command)
 {
     switch (command)
     {
     case "g_x=muffin":
         if (!IsEasterEggActive)
         {
             GameConsole.AddMessage("What the hay?", false, false);
         }
         else
         {
             GameConsole.AddMessage("I zap u!", false, false);
         }
         IsEasterEggActive = !IsEasterEggActive;
         break;
     }
 }
示例#3
0
 public void InputMessage(string s)
 {
     currentChosenCommand = -1;
     GameConsole.AddMessage(s, true);
     if (s != "")
     {
         if (commandsList.Count < maxAmount)
         {
             commandsList.Add(s);
         }
         else
         {
             for (int i = 0; i < maxAmount - 1; i++)
             {
                 commandsList[i] = commandsList[i + 1];
             }
             commandsList[maxAmount - 1] = s;
         }
     }
 }
示例#4
0
 public static void CompleteAchievement(int id)
 {
     GameConsole.AddMessage($"Achievement_{id} unlocked");
     achievementStatus[id] = true;
 }
示例#5
0
 void GameOver(HeroController controller, bool isSomebodyWon)
 {
     IntroStarted();
     if (isSomebodyWon)
     {
         m_GameUI.StopClock();
         if (ReferenceEquals(controller, playerController))
         {
             Debug.Log("AI wins");
             aiPoints++;
             OnRoundOver?.Invoke(1, currentRound, 1);
         }
         else
         {
             Debug.Log("Player wins");
             playerPoints++;
             OnRoundOver?.Invoke(0, currentRound, -1);
         }
     }
     else
     {
         Debug.Log("Draw");
         OnRoundOver?.Invoke(0, currentRound, 0);
     }
     currentRound++;
     if (currentRound < amountOfRound)
     {
         RestoreGame();
     }
     else
     {
         playerController.RestoreStartState();
         AIController.RestoreStartState();
         OnGameOver?.Invoke();
         m_MenuFSM.LockChangeState();
         if (playerPoints > aiPoints)
         {
             if (playerController.HeroName == HeroesNames.StarlightGlimmer && AIController.HeroName == HeroesNames.TwilightSparkle)
             {
                 m_GameUI.ShowAchievement(0);
             }
             if (playerController.HeroName == HeroesNames.TwilightSparkle && AIController.HeroName == HeroesNames.TwilightSparkle)
             {
                 m_GameUI.ShowAchievement(2);
             }
             if (playerController.HeroName == HeroesNames.Fluttershy && (AIController.HeroName == HeroesNames.PinkiePie || AIController.HeroName == HeroesNames.Rarity))
             {
                 m_GameUI.ShowAchievement(3);
             }
             GameUser.wins++;
             GameConsole.AddMessage("Player wins");
             m_Announcement.PlayHeroWin(playerController.HeroName);
             m_GameUI.ShowGameResult($"{GameLanguages.GetCurrentLocalization(playerController.HeroName.ToString())} {GameLanguages.GetCurrentLocalization("WinText")}");
         }
         else if (playerPoints < aiPoints)
         {
             GameConsole.AddMessage("AI wins");
             GameUser.loses++;
             m_Announcement.PlayHeroWin(AIController.HeroName);
             m_GameUI.ShowGameResult($"{GameLanguages.GetCurrentLocalization(AIController.HeroName.ToString())} {GameLanguages.GetCurrentLocalization("WinText")}");
         }
         else
         {
             GameConsole.AddMessage("Draw");
             GameUser.draws++;
             m_GameUI.ShowGameResult($"{GameLanguages.GetCurrentLocalization("DrawText")}");
         }
     }
 }