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-05-20 02:14:18 +00:00
|
|
|
explicit CStaticInterference(size_t 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
|