public static int GetID(Tile t) { if (t == null) return -1; for (int i = 0; i < MaxTiles; i++) if (_tiles[i] != null && t.GetType() == _tiles[i].GetType() && t.TileName == _tiles[i].TileName && t.TexturePosition == _tiles[i].TexturePosition) return i; return -1; }
public static void AddTile(Tile t, int id) { if (_tiles[id] == null) _tiles[id] = t; }
public static Rectangle GetSpriteRectangle(Tile tile) { return GetSpriteRectangle((int)tile.TexturePosition.X, (int)tile.TexturePosition.Y); }