metaforce/Runtime/CStaticInterference.hpp

30 lines
522 B
C++
Raw Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
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-19 19:52:07 -07:00
class CStateManager;
struct CStaticInterferenceSource
{
TUniqueId id;
float magnitude;
float timeLeft;
};
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
};
}