2016-04-13 06:07:23 +00:00
|
|
|
#ifndef __URDE_CSTATICINTERFERENCE_HPP__
|
|
|
|
#define __URDE_CSTATICINTERFERENCE_HPP__
|
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
|
|
|
}
|
|
|
|
|
2016-04-13 06:07:23 +00:00
|
|
|
#endif // __URDE_CSTATICINTERFERENCE_HPP__
|