Exemplo n.º 1
0
 void OnTileClickedHandler(IGameBoardTileView tile)
 {
     if (this.OnTileClicked != null)
     {
         this.OnTileClicked(tile);
     }
 }
Exemplo n.º 2
0
    void OnTileClicked(IGameBoardTileView tile)
    {
        // ignore clicks on non-empty tiles
        if (this.board[tile.Row, tile.Col] != TileMark.Empty)
        {
            return;
        }

        var input = this.board.InputController;

        input.Interactable   = false;
        input.OnTileClicked -= this.OnTileClicked;

        this.FireOnMoveCompleted(new PlayersMove(tile.Row, tile.Col));
    }