Exemplo n.º 1
0
    public void SetPlayerIndicator(PlayerPiece.Player Player)
    {
        CurrentRotation = Player == PlayerPiece.Player.PLAYER_1 ? Player_1 : Player_2;

        Player_1Go.SetActive(Player == PlayerPiece.Player.PLAYER_1);
        Player_2Go.SetActive(Player == PlayerPiece.Player.PLAYER_2);
    }
Exemplo n.º 2
0
 public void NewGame()
 {
     CurrentPlayer = PlayerPiece.Player.PLAYER_1;
     PlayerIndicatorGo.GetComponent <PlayerIndicator>().SetPlayerIndicator(PlayerPiece.Player.PLAYER_1);
     ClearPlayerPiecesFromBoard();
     SpawnPlayerPieces();
     SetBoardNeighbors();
     Menu.gameObject.SetActive(false);
 }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        Cells         = new List <List <Cell> >();
        CurrentPlayer = PlayerPiece.Player.PLAYER_1;

        CreateBoardCells();

        SpawnPlayerPieces();

        SetBoardNeighbors();
    }
Exemplo n.º 4
0
    private void GameOver(PlayerPiece.Player player)
    {
        Menu.gameObject.SetActive(true);
        Text text = Menu.WinnerText.GetComponent <Text>();

        if (player == PlayerPiece.Player.PLAYER_1)
        {
            text.text = "The king has escaped!";
        }
        else
        {
            text.text = "The king has been captured!";
        }
    }
Exemplo n.º 5
0
 void SwitchPlayers()
 {
     CurrentPlayer = CurrentPlayer == PlayerPiece.Player.PLAYER_1 ? PlayerPiece.Player.PLAYER_2 : PlayerPiece.Player.PLAYER_1;
     PlayerIndicatorGo.GetComponent <PlayerIndicator>().SetPlayerIndicator(CurrentPlayer);
 }