refactor: changed cast type
This commit is contained in:
@@ -114,7 +114,7 @@ public:
|
|||||||
const Tower* getLastDamageTower() { return m_LastDamage; }
|
const Tower* getLastDamageTower() { return m_LastDamage; }
|
||||||
|
|
||||||
void damage(float dmg, const Tower* damager) { m_Health = std::max(0.0f, m_Health - dmg); m_LastDamage = damager; }
|
void damage(float dmg, const Tower* damager) { m_Health = std::max(0.0f, m_Health - dmg); m_LastDamage = damager; }
|
||||||
void heal(float heal) { m_Health = std::min((float)getStats()->getMaxLife(), m_Health + heal); }
|
void heal(float heal) { m_Health = std::min(static_cast<float>(getStats()->getMaxLife()), m_Health + heal); }
|
||||||
|
|
||||||
float getX() const { return m_X; }
|
float getX() const { return m_X; }
|
||||||
void setX(float x) { m_X = x; }
|
void setX(float x) { m_X = x; }
|
||||||
@@ -132,7 +132,7 @@ public:
|
|||||||
Direction getDirection() const { return m_Direction; }
|
Direction getDirection() const { return m_Direction; }
|
||||||
void setDirection(Direction dir) { m_Direction = dir; }
|
void setDirection(Direction dir) { m_Direction = dir; }
|
||||||
protected:
|
protected:
|
||||||
void initHealth() { m_Health = (float)getStats()->getMaxLife(); }
|
void initHealth() { m_Health = static_cast<float>(getStats()->getMaxLife()); }
|
||||||
private:
|
private:
|
||||||
void updateEffects(std::uint64_t delta);
|
void updateEffects(std::uint64_t delta);
|
||||||
EffectDuration& getEffect(EffectType type);
|
EffectDuration& getEffect(EffectType type);
|
||||||
|
|||||||
Reference in New Issue
Block a user