feat: remove tower
This commit is contained in:
@@ -12,15 +12,19 @@ namespace render {
|
||||
class VertexCache {
|
||||
|
||||
typedef std::vector<float> Vector;
|
||||
typedef std::pair<Vector::iterator, Vector::iterator> ElementsIndex;
|
||||
typedef std::pair<ElementsIndex, ElementsIndex> DataIndex;
|
||||
|
||||
struct DataIndex {
|
||||
Vector position;
|
||||
Vector color;
|
||||
};
|
||||
|
||||
private:
|
||||
Vector m_Positions;
|
||||
Vector m_Colors;
|
||||
std::size_t m_VertexCount;
|
||||
std::unordered_map<std::uint64_t, DataIndex> m_Indexes;
|
||||
std::unique_ptr<GL::VertexArray> m_VertexArray;
|
||||
public:
|
||||
VertexCache() : m_VertexCount(0) {}
|
||||
|
||||
void addData(std::uint64_t index, std::vector<float> positions, std::vector<float> colors);
|
||||
void removeData(std::uint64_t index);
|
||||
void clear();
|
||||
|
||||
@@ -71,6 +71,7 @@ private:
|
||||
void renderMobTooltip() const;
|
||||
void detectClick();
|
||||
void detectMobHovering() const;
|
||||
void removeTower();
|
||||
glm::vec2 getCursorWorldPos() const;
|
||||
glm::vec2 getClickWorldPos() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user