Ejemplo n.º 1
0
    public override void MakeMove(GridNode selectedNode, Vector2Int destination)
    {
        Vector2Int source = selectedNode.Position;
        Piece      piece  = SpaceManager.GridNodes[source.x][source.y].Piece;

        SpaceManager.GridNodes[destination.x][destination.y].MovePiece(piece);
        SpaceManager.GridNodes[source.x][source.y].MovePiece(null);
        piece.AfterMoveEffect();
    }
Ejemplo n.º 2
0
    protected void MovePiece(GridNode selectedNode, Vector2Int destination)
    {
        Piece piece = selectedNode.Piece;

        SpaceManager.GridNodes[destination.x][destination.y].MovePiece(piece);
        selectedNode.MovePiece(null);

        piece.AfterMoveEffect();
    }