restructure project

This commit is contained in:
2023-08-13 11:59:13 +02:00
parent b4836847f5
commit 50c17e8ed1
210 changed files with 471 additions and 422 deletions

View File

@@ -0,0 +1,32 @@
#pragma once
#include "td/protocol/Protocol.h"
#include "td/game/BaseGame.h"
namespace td {
namespace protocol {
class PlaceTowerPacket : public Packet {
private:
std::int32_t m_TowerX, m_TowerY;
game::TowerType m_TowerType;
public:
PlaceTowerPacket() {}
PlaceTowerPacket(std::int32_t x, std::int32_t y, game::TowerType type) :
m_TowerX(x), m_TowerY(y), m_TowerType(type) {
}
virtual ~PlaceTowerPacket() {}
virtual DataBuffer Serialize(bool packetID = true) const;
virtual void Deserialize(DataBuffer& data);
virtual void Dispatch(PacketHandler* handler) const;
std::int32_t GetTowerX() const { return m_TowerX; }
std::int32_t GetTowerY() const { return m_TowerY; }
game::TowerType GetTowerType() const { return m_TowerType; }
virtual PacketType GetType() const { return PacketType::PlaceTower; }
};
} // namespace protocol
} // namespace td