metaforce/Runtime/World/CHealthInfo.hpp

24 lines
627 B
C++
Raw Permalink Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
2016-04-24 22:03:38 -07:00
2017-02-11 19:17:18 -08:00
#include "Runtime/RetroTypes.hpp"
2016-04-24 22:03:38 -07:00
2021-04-10 01:42:06 -07:00
namespace metaforce {
2018-12-07 21:30:43 -08:00
class CHealthInfo {
float x0_health;
float x4_knockbackResistance;
2016-04-24 22:03:38 -07:00
public:
explicit CHealthInfo(float hp) : x0_health(hp), x4_knockbackResistance(0.f) {}
2016-06-30 12:33:38 -07:00
2018-12-07 21:30:43 -08:00
CHealthInfo(float hp, float resist) : x0_health(hp), x4_knockbackResistance(resist) {}
2016-06-30 12:33:38 -07:00
explicit CHealthInfo(CInputStream& in);
2018-12-07 21:30:43 -08:00
void SetHP(float hp) { x0_health = hp; }
float GetHP() const { return x0_health; }
float GetKnockbackResistance() const { return x4_knockbackResistance; }
2018-12-31 00:37:52 -08:00
void SetKnockbackResistance(float r) { x4_knockbackResistance = r; }
2016-04-24 22:03:38 -07:00
};
2021-04-10 01:42:06 -07:00
} // namespace metaforce