//GameOverPanel public void GameOverFn(GAME_RESULT GameResult) { Debug.Log("GameOverFn() fired!"); Group.ClearRecordDataInSyncPacket(); GameObject gameUI = GameObject.FindGameObjectWithTag("gsui"); Instantiate(GameOverPanel[0], new Vector2(0, 0), Quaternion.identity); GameObject gameOverPanel = GameObject.Find("GameOverPanel(Clone)"); gameOverPanel.transform.parent = gameUI.transform; gameOverPanel.transform.SetPositionAndRotation(new Vector2(650, 350), Quaternion.identity); GameObject gameOverText = GameObject.Find("WIN_or_LOSE"); if (GameResult == GAME_RESULT.WIN) { gameOverText.GetComponent <Text>().text = "YOU WIN!!"; } else { gameOverText.GetComponent <Text>().text = "YOU LOSE..."; } }
private void DisplayGameState(GAME_RESULT result) { Console.SetCursorPosition(0, 33); switch (result) { case GAME_RESULT.PLAYER_WIN: Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("\nВы выиграли"); break; case GAME_RESULT.COMPUTER_WIN: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("\nКомпьютер выиграл"); break; case GAME_RESULT.DRAW: Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("\nНичья"); break; default: break; } Console.ResetColor(); Console.WriteLine("Для продолжения нажмите Enter"); }