2016-04-12 23:07:23 -07:00
|
|
|
#ifndef __URDE_CSTATICINTERFERENCE_HPP__
|
|
|
|
#define __URDE_CSTATICINTERFERENCE_HPP__
|
2015-08-17 13:33:58 -07:00
|
|
|
|
2015-08-19 19:52:07 -07:00
|
|
|
#include <vector>
|
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
|
2016-03-04 15:04:53 -08:00
|
|
|
namespace urde
|
2015-08-17 15:05:00 -07:00
|
|
|
{
|
2015-08-19 19:52:07 -07:00
|
|
|
class CStateManager;
|
|
|
|
|
|
|
|
struct CStaticInterferenceSource
|
|
|
|
{
|
|
|
|
TUniqueId id;
|
|
|
|
float magnitude;
|
|
|
|
float timeLeft;
|
|
|
|
};
|
2015-08-17 15:05:00 -07:00
|
|
|
|
2015-08-17 13:33:58 -07:00
|
|
|
class CStaticInterference
|
|
|
|
{
|
2015-08-19 19:52:07 -07:00
|
|
|
std::vector<CStaticInterferenceSource> m_sources;
|
|
|
|
public:
|
2017-06-11 21:23:34 -07: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 13:33:58 -07:00
|
|
|
};
|
|
|
|
|
2015-08-17 15:05:00 -07:00
|
|
|
}
|
|
|
|
|
2016-04-12 23:07:23 -07:00
|
|
|
#endif // __URDE_CSTATICINTERFERENCE_HPP__
|