private void SetState(TileActionState old, TileActionState newState) { if (old.Type != newState.Type) { MapManager.Instance.Map.SetTileType(_tile.Position, newState.Type); } if (Math.Abs(old.Height - newState.Height) > 0.001) { MapManager.Instance.Map.SetTileHeight(_tile.Position, newState.Height); } }
public TileAction(Tile tile) { _tile = tile; _oldState = new TileActionState { Type = tile.Type, Height = tile.Height }; _newState = new TileActionState { Type = tile.Type, Height = tile.Height }; }