feat: add basic towers rendering
This commit is contained in:
@@ -111,6 +111,8 @@ typedef std::vector<MobPtr> MobList;
|
||||
|
||||
typedef std::array<Color, 2> SpawnColorPalette;
|
||||
|
||||
typedef std::vector<TowerPtr> TowerList;
|
||||
|
||||
class World {
|
||||
protected:
|
||||
TowerTileColorPalette m_TowerPlacePalette;
|
||||
@@ -125,7 +127,7 @@ protected:
|
||||
|
||||
MobList m_Mobs;
|
||||
|
||||
std::vector<TowerPtr> m_Towers;
|
||||
TowerList m_Towers;
|
||||
|
||||
Game* m_Game;
|
||||
public:
|
||||
@@ -141,7 +143,7 @@ public:
|
||||
|
||||
void spawnMobAt(MobID id, MobType type, std::uint8_t level, PlayerID sender, float x, float y, Direction dir);
|
||||
|
||||
void placeTowerAt(TowerType type, std::int32_t x, std::int32_t y, PlayerID builder);
|
||||
TowerPtr placeTowerAt(TowerID id, TowerType type, std::int32_t x, std::int32_t y, PlayerID builder);
|
||||
|
||||
TilePtr getTile(std::int32_t x, std::int32_t y) const;
|
||||
|
||||
@@ -178,6 +180,8 @@ public:
|
||||
|
||||
Team& getTeam(TeamColor team);
|
||||
const Team& getTeam(TeamColor team) const;
|
||||
|
||||
const TowerList& getTowers() const { return m_Towers; };
|
||||
private:
|
||||
void moveMobs(std::uint64_t delta);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user