Exemple #1
0
 public void Seed()
 {
     if (Status.HasFlag(FieldTileStatus.Tilled))
     {
         Status            |= FieldTileStatus.Seeded;
         renderer.Character = new Character((int)Glyph.Bullet, TermColor.Parse("#1a140d"), renderer.Character.BackColor);
     }
 }
Exemple #2
0
        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));
        }