public void Seed() { if (Status.HasFlag(FieldTileStatus.Tilled)) { Status |= FieldTileStatus.Seeded; renderer.Character = new Character((int)Glyph.Bullet, TermColor.Parse("#1a140d"), renderer.Character.BackColor); } }
private Tile GetTile(TmxLayerTile tile, TmxTileset tileset) { int code = int.Parse(tileset.Tiles[tile.Gid - 1].Properties["Code"]); TermColor foreground = TermColor.Parse(tileset.Tiles[tile.Gid - 1].Properties["Foreground"]); TermColor background = TermColor.Parse(tileset.Tiles[tile.Gid - 1].Properties["Background"]); Character character = new Character(code, foreground, background); Vector2D position = new Vector2D(tile.X, tile.Y); bool collideable = bool.Parse(tileset.Tiles[tile.Gid - 1].Properties["Collideable"]); return(new Tile(character, position, collideable)); }