feat: improved tower place + tower upgrade
This commit is contained in:
@@ -125,6 +125,7 @@ typedef std::shared_ptr<Tower> TowerPtr;
|
||||
namespace TowerFactory {
|
||||
|
||||
TowerPtr createTower(TowerType type, TowerID id, std::int32_t x, std::int32_t y, PlayerID builder);
|
||||
std::string getTowerName(TowerType type);
|
||||
|
||||
} // namespace TowerFactory
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
bool CanPlaceLittleTower(const glm::vec2& worldPos, PlayerID player) const;
|
||||
bool CanPlaceBigTower(const glm::vec2& worldPos, PlayerID player) const;
|
||||
|
||||
TowerPtr GetTower(const glm::vec2& position); // returns null if no tower is here
|
||||
TowerPtr getTower(const glm::vec2& position) const; // returns null if no tower is here
|
||||
|
||||
const std::unordered_map<ChunkCoord, ChunkPtr>& getChunks() const { return m_Chunks; }
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ private:
|
||||
glm::vec2 m_HoldCursorPos;
|
||||
float m_Zoom;
|
||||
float m_CamSensibility = 1;
|
||||
bool m_TowerPlacePopupOpened = false;
|
||||
bool m_PopupOpened = false;
|
||||
VertexCache m_TowersCache;
|
||||
public:
|
||||
WorldRenderer(game::World* world, client::ClientGame* client);
|
||||
@@ -53,6 +53,8 @@ private:
|
||||
void renderMobs() const;
|
||||
void renderTileSelect() const;
|
||||
void renderPopups() const;
|
||||
void renderTowerPlacePopup() const;
|
||||
void renderTowerUpgradePopup() const;
|
||||
void renderMobTooltip() const;
|
||||
void detectClick();
|
||||
glm::vec2 getCursorWorldPos() const;
|
||||
|
||||
Reference in New Issue
Block a user