metaforce/Runtime/CStaticInterference.hpp

27 lines
539 B
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2015-08-17 20:33:58 +00:00
2015-08-20 02:52:07 +00:00
#include <vector>
#include "Runtime/RetroTypes.hpp"
2015-08-20 02:52:07 +00:00
2018-12-08 05:30:43 +00:00
namespace urde {
2015-08-20 02:52:07 +00:00
class CStateManager;
2018-12-08 05:30:43 +00:00
struct CStaticInterferenceSource {
TUniqueId id;
float magnitude;
float timeLeft;
2015-08-20 02:52:07 +00:00
};
2018-12-08 05:30:43 +00:00
class CStaticInterference {
std::vector<CStaticInterferenceSource> m_sources;
2015-08-20 02:52:07 +00:00
public:
explicit CStaticInterference(int sourceCount);
2018-12-08 05:30:43 +00:00
void RemoveSource(TUniqueId id);
void Update(CStateManager&, float dt);
float GetTotalInterference() const;
void AddSource(TUniqueId id, float magnitude, float duration);
2015-08-17 20:33:58 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace urde