Files
Tower-Defense2/include/td/protocol/command/CommandData.h

54 lines
732 B
C++

#pragma once
#include <string>
#include <td/Types.h>
#include <array>
namespace td {
namespace protocol {
namespace cdata {
struct PlaceTower {
CastleType m_Type : 4;
PlayerID m_Placer : 4;
CastleCoords m_Position;
};
struct UpgradeTower {
CastleID m_Tower : 12;
std::uint8_t m_Upgrade : 4;
};
struct SpawnTroop {
EntityType m_Type : 5;
std::uint8_t m_Level : 3;
EntityCoords m_Position;
PlayerID m_Sender;
};
struct UseItem {
ShopItem m_Item : 4;
PlayerID m_User : 4;
EntityCoords m_Position;
};
struct TeamChange {
PlayerID m_Player : 7;
Team m_NewTeam : 1;
};
struct PlayerJoin {
PlayerID m_ID;
std::string m_Name;
};
struct End {};
} // namespace cdata
} // namespace protocol
} // namespace td