예제 #1
0
    /// <summary>
    /// A special function that allows the object to jump to the destination tile, leaving the visible portion behind as a facade.
    /// </summary>
    /// <param name="x"></param>
    /// <param name="y"></param>
    public void FacadeJumpToTile(int x, int y)
    {
        TileX = x;
        TileY = y;
        ClearRaisedTerrainFlag();
        var args = new MoveEventArgs(this)
        {
            FromTile = new Vector2Int(0, 0),
            ToTile   = new Vector2Int(x, y)
        };

        TilePositionChanged?.Invoke(this, args);
        MoveableMoved?.Invoke(this, args);
    }
 private void tilePositionComponent_TilePositionChanged(ITilePositionComponent sender, TilePositionEventArgs e)
 {
     TilePositionChanged?.Invoke(sender, e);
 }