public void UpdateTile(bool? isActive = null, byte? wall = null, byte? type = null, byte? liquid = null, bool? isLava = null, PointShort? frame = null) { if (isActive != null) IsActive = (bool) isActive; if (wall != null) Wall = (byte) wall; if (type != null) Type = (byte) type; if (liquid != null) Liquid = (byte) liquid; if (isLava != null) IsLava = (bool) isLava; if (frame != null) Frame = (PointShort) frame; }
public Tile() { IsActive = false; Type = 0; Frame = new PointShort(-1, -1); Wall = 0; IsLighted = false; Liquid = 0; IsLava = false; }
private static bool MatchFields(PointShort a, PointShort m) { return (a.X == m.X && a.Y == m.Y); }
public bool Equals(PointShort p) { return MatchFields(this, p); }
private void SetTileSprite(PointInt32 point, PointShort frame, byte type) { var curTile = _world.Tiles[point.X, point.Y]; if (curTile != null) { curTile.IsActive = true; curTile.Type = type; curTile.Frame = frame; _renderer.UpdateWorldImage(point); } }