mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-09 17:52:08 -10:00
This allows specifying how many times per second an effect should be triggered for a particle source instead of triggering the effect every frame. This will allow modders to achieve more consistent particle effects regardless of FPS.
44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
#ifndef SINGLE_PARTICLE_EFFECT_H
|
|
#define SINGLE_PARTICLE_EFFECT_H
|
|
#pragma once
|
|
|
|
#include "globalincs/pstypes.h"
|
|
#include "particle/ParticleEffect.h"
|
|
#include "particle/ParticleManager.h"
|
|
#include "particle/util/ParticleProperties.h"
|
|
#include "particle/util/EffectTiming.h"
|
|
|
|
namespace particle {
|
|
namespace effects {
|
|
/**
|
|
* @ingroup particleEffects
|
|
*/
|
|
class SingleParticleEffect: public ParticleEffect {
|
|
private:
|
|
util::ParticleProperties m_particleProperties;
|
|
|
|
util::EffectTiming m_timing;
|
|
|
|
public:
|
|
explicit SingleParticleEffect(const SCP_string& name);
|
|
|
|
bool processSource(ParticleSource* source) override;
|
|
|
|
void parseValues(bool nocreate) override;
|
|
|
|
void pageIn() override;
|
|
|
|
void initializeSource(ParticleSource& source) override;
|
|
|
|
EffectType getType() const override { return EffectType::Single; }
|
|
|
|
util::ParticleProperties& getProperties() { return m_particleProperties; }
|
|
|
|
static SingleParticleEffect* createInstance(int effectID, float minSize, float maxSize,
|
|
float lifetime = -1.0f);
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif // SINGLE_PARTICLE_EFFECT_H
|