Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- internal virtual Tile TileAt(Int32 x, Int32 y)
- {
- // The default way for a realm to work is by wrapping. This method can be overridden if other methods are desired.
- while (x < 0)
- x += this.width;
- while (x >= this.width)
- x -= this.width;
- if (y < 0) // This is above the top most tiles, should default to empty blocks of air.
- return new Tile() { BackType = TileBackType.None, BaseType = TileBaseType.Air, OverType = TileOverType.None };
- if (y >= this.Height) // This is below ground, on the lowest levels. Defaults to Stone for now.
- return new Tile() { BackType = TileBackType.None, BaseType = TileBaseType.Stone, OverType = TileOverType.None };
- return this.Tiles[x, y];
- }
- ...
Advertisement
Add Comment
Please, Sign In to add comment