changed team structure
This commit is contained in:
@@ -76,16 +76,6 @@ struct DecorationTile : Tile{
|
||||
virtual TileType getType() const{ return TileType::Decoration; }
|
||||
};
|
||||
|
||||
struct Spawn{
|
||||
Direction direction;
|
||||
std::int32_t x, y;
|
||||
};
|
||||
|
||||
struct TeamCastle{
|
||||
std::int32_t x, y;
|
||||
std::uint16_t life = 1000;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<Tile> TilePtr;
|
||||
typedef std::vector<std::uint16_t> ChunkPalette;
|
||||
|
||||
@@ -130,9 +120,6 @@ protected:
|
||||
|
||||
SpawnColorPalette m_SpawnColorPalette;
|
||||
|
||||
Spawn m_Spawns[2];
|
||||
TeamCastle m_Castles[2];
|
||||
|
||||
TilePalette m_TilePalette;
|
||||
|
||||
MobList m_Mobs;
|
||||
@@ -167,21 +154,22 @@ public:
|
||||
|
||||
const std::unordered_map<ChunkCoord, ChunkPtr>& getChunks() const{ return m_Chunks; }
|
||||
|
||||
const Spawn& getRedSpawn() const{ return m_Spawns[(std::size_t) TeamColor::Red]; }
|
||||
const Spawn& getBlueSpawn() const{ return m_Spawns[(std::size_t) TeamColor::Blue]; }
|
||||
|
||||
const Spawn& getSpawn(TeamColor color) const{ return m_Spawns[(std::size_t) color]; }
|
||||
|
||||
const Color& getSpawnColor(TeamColor color) const{ return m_SpawnColorPalette[(std::size_t) color]; }
|
||||
const SpawnColorPalette& getSpawnColors() const{ return m_SpawnColorPalette; }
|
||||
|
||||
const TeamCastle& getRedCastle() const{ return m_Castles[(std::size_t) TeamColor::Red]; }
|
||||
const TeamCastle& getBlueCastle() const{ return m_Castles[(std::size_t) TeamColor::Blue]; }
|
||||
|
||||
const MobList& getMobList() const{ return m_Mobs; }
|
||||
MobList& getMobList(){ return m_Mobs; }
|
||||
|
||||
const Color& getTileColor(TilePtr tile) const;
|
||||
|
||||
Team& getRedTeam();
|
||||
const Team& getRedTeam() const;
|
||||
|
||||
Team& getBlueTeam();
|
||||
const Team& getBlueTeam() const;
|
||||
|
||||
Team& getTeam(TeamColor team);
|
||||
const Team& getTeam(TeamColor team) const;
|
||||
private:
|
||||
void moveMobs(std::uint64_t delta);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user