changed team structure
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
@@ -15,10 +17,22 @@ enum class TeamColor : std::int8_t{
|
||||
Blue
|
||||
};
|
||||
|
||||
struct Spawn{
|
||||
Direction direction;
|
||||
std::int32_t x, y;
|
||||
};
|
||||
|
||||
struct TeamCastle{
|
||||
std::int32_t x, y;
|
||||
std::uint16_t life = 1000;
|
||||
};
|
||||
|
||||
class Team{
|
||||
private:
|
||||
std::vector<Player*> m_Players;
|
||||
TeamColor m_Color;
|
||||
Spawn m_Spawn;
|
||||
TeamCastle m_TeamCastle;
|
||||
public:
|
||||
Team(TeamColor color);
|
||||
|
||||
@@ -27,6 +41,12 @@ public:
|
||||
|
||||
TeamColor getColor() const;
|
||||
|
||||
const Spawn& getSpawn() const {return m_Spawn;}
|
||||
Spawn& getSpawn() {return m_Spawn;}
|
||||
|
||||
const TeamCastle& getCastle() const {return m_TeamCastle;}
|
||||
TeamCastle& getCastle() {return m_TeamCastle;}
|
||||
|
||||
std::uint8_t getPlayerCount() const;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user