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>
|
2019-09-23 19:00:23 +00:00
|
|
|
#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
|
|
|
};
|
2015-08-17 22:05:00 +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:
|
2020-03-26 01:25:11 +00:00
|
|
|
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
|