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 "RetroTypes.hpp"
|
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2015-08-17 22:05:00 +00:00
|
|
|
{
|
2015-08-20 02:52:07 +00:00
|
|
|
class CStateManager;
|
|
|
|
|
|
|
|
struct CStaticInterferenceSource
|
|
|
|
{
|
|
|
|
TUniqueId id;
|
|
|
|
float magnitude;
|
|
|
|
float timeLeft;
|
|
|
|
};
|
2015-08-17 22:05:00 +00:00
|
|
|
|
2015-08-17 20:33:58 +00:00
|
|
|
class CStaticInterference
|
|
|
|
{
|
2015-08-20 02:52:07 +00:00
|
|
|
std::vector<CStaticInterferenceSource> m_sources;
|
|
|
|
public:
|
2017-06-12 04:23:34 +00:00
|
|
|
CStaticInterference(int sourceCount);
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2015-08-17 22:05:00 +00:00
|
|
|
}
|
|
|
|
|