refactor: format project

This commit is contained in:
2021-11-21 17:02:42 +01:00
parent 0f328e6f81
commit f48af51dc7
36 changed files with 162 additions and 162 deletions

View File

@@ -61,7 +61,7 @@ public:
std::uint16_t getMaxLife() const { return m_MaxLife; }
};
struct EffectDuration{
struct EffectDuration {
EffectType type;
float duration; // in seconds
const Tower* tower; // the tower that gived the effect
@@ -88,7 +88,7 @@ private:
float m_X = 0, m_Y = 0;
public:
Mob(MobID id, MobLevel level, PlayerID sender) : m_Sender(sender), m_Level(level),
Mob(MobID id, MobLevel level, PlayerID sender) : m_Sender(sender), m_Level(level),
m_EffectFireTimer(1000), m_EffectPoisonTimer(1000), m_EffectHealTimer(1000) {
}
@@ -97,7 +97,7 @@ public:
virtual void tick(std::uint64_t delta);
virtual void OnDeath(World* world){}
virtual void OnDeath(World* world) {}
const TowerImmunities& getTowerImmunities() const { return getMobTowerImmunities(getType(), m_Level); }
const EffectImmunities& getEffectImmunities() const { return getMobEffectImmunities(getType(), m_Level); }

View File

@@ -22,7 +22,7 @@ private:
bool m_GoldChanged;
bool m_ExpChanged;
public:
Player(std::uint8_t id = 0) : m_TeamColor(game::TeamColor::None), m_Gold(0), m_Exp(0), m_ID(id), m_GoldPerSecond(5),
Player(std::uint8_t id = 0) : m_TeamColor(game::TeamColor::None), m_Gold(0), m_Exp(0), m_ID(id), m_GoldPerSecond(5),
m_GoldChanged(false), m_ExpChanged(false) {}
const std::string& getName() const { return m_Name; }
@@ -34,7 +34,7 @@ public:
std::uint8_t getGoldPerSecond() const { return m_GoldPerSecond; }
void setGoldPerSecond(std::uint8_t goldPerSecond) { m_GoldPerSecond = goldPerSecond; }
std::uint32_t getGold() const { return m_Gold;}
std::uint32_t getGold() const { return m_Gold; }
void setGold(std::uint32_t gold) { m_GoldChanged = true; m_Gold = gold; }
void addGold(std::uint32_t gold) { m_GoldChanged = true; m_Gold += gold; }
void removeGold(std::uint32_t gold) { m_GoldChanged = true; m_Gold -= gold; }