mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 17:51:47 +01:00
Add Building, Add Hard floors
This commit is contained in:
@@ -10,6 +10,7 @@ enum class GroundTileTypes
|
||||
{
|
||||
Air,
|
||||
Dirt,
|
||||
Hard,
|
||||
Stone,
|
||||
Iron
|
||||
};
|
||||
@@ -89,6 +90,13 @@ namespace Tiles
|
||||
static GroundTileType* AIR = new GroundTileType("", GroundTileTypes::Air);
|
||||
static GroundTileType* DIRT = new RandomGroundTile("tiles/dirt/dirt[0].png", GroundTileTypes::Dirt, 5);
|
||||
static GroundTileType* IRON = new GroundTileType("tiles/ores/Ore_Ironium.png", GroundTileTypes::Iron);
|
||||
|
||||
namespace Special
|
||||
{
|
||||
static GroundTileType* HARD_LEFT = new GroundTileType("tiles/dirt/special/hardLeft.png", GroundTileTypes::Hard);
|
||||
static GroundTileType* HARD_RIGHT = new GroundTileType("tiles/dirt/special/hardRight.png", GroundTileTypes::Hard);
|
||||
static GroundTileType* HARD_MIDDLE = new GroundTileType("tiles/dirt/special/hardMiddle.png", GroundTileTypes::Hard);
|
||||
}
|
||||
}
|
||||
|
||||
class WorldTile
|
||||
@@ -99,7 +107,7 @@ public:
|
||||
~WorldTile();
|
||||
|
||||
void Draw();
|
||||
void Update(Camera* camera); //TODO: no use
|
||||
void Update(const Camera* camera); //TODO: no use
|
||||
|
||||
Vector2f GetPosition() const {
|
||||
return m_Position;
|
||||
@@ -124,6 +132,9 @@ public:
|
||||
bool m_Hightlight { false };
|
||||
|
||||
private:
|
||||
void DrawSide(const TileDirection& direction);
|
||||
|
||||
|
||||
Vector2f m_Position;
|
||||
GroundTileType* m_GroundTileType;
|
||||
|
||||
@@ -135,17 +146,7 @@ private:
|
||||
|
||||
surroundingTiles m_SurroundingTiles;
|
||||
|
||||
Texture* m_pTopLeftTexture;
|
||||
Texture* m_pTopRightTexture;
|
||||
Texture* m_pBottomLeftTexture;
|
||||
Texture* m_pBottomRightTexture;
|
||||
|
||||
Texture* m_pMiddleTopTexture;
|
||||
Texture* m_pMiddleBottomTexture;
|
||||
Texture* m_pMiddleLeftTexture;
|
||||
Texture* m_pMiddleRightTexture;
|
||||
std::vector<Texture*> m_SideTextures { 8, nullptr };
|
||||
|
||||
Texture* m_pAllTexture;
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user