Add new terrain types to World

GitOrigin-RevId: ab811a1b52ea011a7acea078ec6e78735a298d59
This commit is contained in:
Colin McMillen 2020-02-19 15:06:02 -05:00
parent b06155aa88
commit 0df153581c

View File

@ -12,8 +12,18 @@ namespace SemiColinGames {
Rock, Rock,
RockL, RockL,
RockR, RockR,
Water, WaterL,
Block WaterR,
Block,
Spike,
Wood,
WoodL,
WoodR,
WoodVert,
FenceL,
Fence,
FencePost,
FenceR,
} }
class TileFactory { class TileFactory {
@ -38,8 +48,18 @@ namespace SemiColinGames {
{ Terrain.Rock, GetTextureSource(Textures.Grassland, 3, 1) }, { Terrain.Rock, GetTextureSource(Textures.Grassland, 3, 1) },
{ Terrain.RockL, GetTextureSource(Textures.Grassland, 1, 2) }, { Terrain.RockL, GetTextureSource(Textures.Grassland, 1, 2) },
{ Terrain.RockR, GetTextureSource(Textures.Grassland, 5, 2) }, { Terrain.RockR, GetTextureSource(Textures.Grassland, 5, 2) },
{ Terrain.Water, GetTextureSource(Textures.Grassland, 9, 2) }, { Terrain.WaterL, GetTextureSource(Textures.Grassland, 9, 2) },
{ Terrain.Block, GetTextureSource(Textures.Grassland, 6, 3) }, { Terrain.WaterR, GetTextureSource(Textures.Grassland, 10, 2) },
{ Terrain.Block, GetTextureSource(Textures.Ruins, 2, 0) },
{ Terrain.Spike, GetTextureSource(Textures.Grassland, 11, 8) },
{ Terrain.Wood, GetTextureSource(Textures.Grassland, 10, 3) },
{ Terrain.WoodL, GetTextureSource(Textures.Grassland, 9, 3) },
{ Terrain.WoodR, GetTextureSource(Textures.Grassland, 12, 3) },
{ Terrain.WoodVert, GetTextureSource(Textures.Grassland, 9, 5) },
{ Terrain.FenceL, GetTextureSource(Textures.Grassland, 5, 4) },
{ Terrain.Fence, GetTextureSource(Textures.Grassland, 6, 4) },
{ Terrain.FencePost, GetTextureSource(Textures.Grassland, 7, 4) },
{ Terrain.FenceR, GetTextureSource(Textures.Grassland, 8, 4) },
}; };
} }
@ -100,8 +120,18 @@ namespace SemiColinGames {
{ '.', Terrain.Rock }, { '.', Terrain.Rock },
{ '[', Terrain.RockL }, { '[', Terrain.RockL },
{ ']', Terrain.RockR }, { ']', Terrain.RockR },
{ '~', Terrain.Water }, { '~', Terrain.WaterL },
{ 'X', Terrain.Block } { '`', Terrain.WaterR },
{ 'X', Terrain.Block },
{ '^', Terrain.Spike },
{ '_', Terrain.Wood },
{ '(', Terrain.WoodL },
{ ')', Terrain.WoodR },
{ '|', Terrain.WoodVert },
{ 'd', Terrain.FenceL },
{ 'f', Terrain.Fence },
{ 'x', Terrain.FencePost },
{ 'b', Terrain.FenceR },
}; };
public World(string levelSpecification) { public World(string levelSpecification) {