2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CPLAYERENERGYDRAIN
|
|
|
|
#define _CPLAYERENERGYDRAIN
|
2022-09-19 04:19:46 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#include "MetroidPrime/TGameTypes.hpp"
|
|
|
|
|
|
|
|
#include "rstl/vector.hpp"
|
|
|
|
|
|
|
|
class CEnergyDrainSource {
|
|
|
|
public:
|
2022-10-09 05:37:23 +00:00
|
|
|
CEnergyDrainSource(TUniqueId src, float intensity);
|
2022-09-19 04:19:46 +00:00
|
|
|
TUniqueId GetEnergyDrainSourceId() const { return x0_source; }
|
2022-10-09 05:37:23 +00:00
|
|
|
void SetEnergyDrainIntensity(float in) { x4_intensity = in; }
|
|
|
|
float GetEnergyDrainIntensity() const { return x4_intensity; }
|
2022-09-19 04:19:46 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
TUniqueId x0_source;
|
2022-10-09 05:37:23 +00:00
|
|
|
float x4_intensity;
|
2022-09-19 04:19:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CPlayerEnergyDrain {
|
2024-09-26 05:54:05 +00:00
|
|
|
public:
|
|
|
|
CPlayerEnergyDrain(uint numSources);
|
|
|
|
|
|
|
|
void AddEnergyDrainSource(TUniqueId id, float intensity);
|
|
|
|
void RemoveEnergyDrainSource(TUniqueId id);
|
|
|
|
float GetEnergyDrainIntensity() const;
|
|
|
|
float GetEnergyDrainTime() const { return x10_energyDrainTime; }
|
|
|
|
void ProcessEnergyDrain(const CStateManager& mgr, float dt);
|
|
|
|
|
2022-09-19 04:19:46 +00:00
|
|
|
private:
|
|
|
|
rstl::vector< CEnergyDrainSource > x0_sources;
|
2022-10-09 05:37:23 +00:00
|
|
|
float x10_energyDrainTime;
|
2022-09-19 04:19:46 +00:00
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CPlayerEnergyDrain, 0x14)
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CPLAYERENERGYDRAIN
|