feat: remove tower

This commit is contained in:
2021-12-08 15:34:20 +01:00
parent 78cf2d0f18
commit e4a9c5f763
16 changed files with 88 additions and 38 deletions

View File

@@ -168,6 +168,7 @@ public:
void spawnMobAt(MobID id, MobType type, std::uint8_t level, PlayerID sender, float x, float y, Direction dir);
TowerPtr placeTowerAt(TowerID id, TowerType type, std::int32_t x, std::int32_t y, PlayerID builder);
TowerPtr removeTower(TowerID id);
TilePtr getTile(std::int32_t x, std::int32_t y) const;

View File

@@ -44,6 +44,7 @@ public:
void sendMobs(const std::vector<protocol::MobSend>& mobSends);
void placeTower(game::TowerType type, const glm::vec2& position);
void upgradeTower(game::TowerID tower, game::TowerLevel level);
void removeTower(game::TowerID tower);
};
} // namespace client

View File

@@ -19,6 +19,7 @@ public:
virtual void HandlePacket(const protocol::SpawnMobPacket* packet);
virtual void HandlePacket(const protocol::UpgradeTowerPacket* packet);
virtual void HandlePacket(const protocol::WorldAddTowerPacket* packet);
virtual void HandlePacket(const protocol::RemoveTowerPacket* packet);
};

View File

@@ -40,6 +40,7 @@ public:
virtual void HandlePacket(const protocol::PlaceTowerPacket* packet);
virtual void HandlePacket(const protocol::SendMobsPacket* packet);
virtual void HandlePacket(const protocol::UpgradeTowerPacket* packet);
virtual void HandlePacket(const protocol::RemoveTowerPacket* packet);
std::uint8_t getID() const { return m_ID; }
const game::Player* getPlayer() const { return m_Player; }