Plasma Engine  2.0
Loading...
Searching...
No Matches
ParticleEventReaction.h
1#pragma once
2
3#include <Foundation/Reflection/Reflection.h>
4#include <ParticlePlugin/Module/ParticleModule.h>
5#include <ParticlePlugin/ParticlePluginDLL.h>
6
9
11class PL_PARTICLEPLUGIN_DLL plParticleEventReactionFactory : public plReflectedClass
12{
13 PL_ADD_DYNAMIC_REFLECTION(plParticleEventReactionFactory, plReflectedClass);
14
15public:
16 virtual const plRTTI* GetEventReactionType() const = 0;
17 virtual void CopyReactionProperties(plParticleEventReaction* pObject, bool bFirstTime) const = 0;
18
19 plParticleEventReaction* CreateEventReaction(plParticleEffectInstance* pOwner) const;
20
21 virtual void Save(plStreamWriter& inout_stream) const;
22 virtual void Load(plStreamReader& inout_stream);
23
24 plString m_sEventType;
25 plUInt8 m_uiProbability = 100;
26};
27
28class PL_PARTICLEPLUGIN_DLL plParticleEventReaction : public plReflectedClass
29{
30 PL_ADD_DYNAMIC_REFLECTION(plParticleEventReaction, plReflectedClass);
31
33 friend class plParticleEffectInstance;
34
35protected:
38
39 void Reset(plParticleEffectInstance* pOwner);
40
41 virtual void ProcessEvent(const plParticleEvent& e) = 0;
42
43 plTempHashedString m_sEventName;
44 plUInt8 m_uiProbability;
45 plParticleEffectInstance* m_pOwnerEffect = nullptr;
46};
Definition ParticleEffectInstance.h:25
Base class for all particle event reactions.
Definition ParticleEventReaction.h:12
Definition ParticleEventReaction.h:29
This class holds information about reflected types. Each instance represents one type that is known t...
Definition RTTI.h:30
All classes that should be dynamically reflectable, need to be derived from this base class.
Definition DynamicRTTI.h:86
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
A class to use together with plHashedString for quick comparisons with temporary strings that need no...
Definition HashedString.h:151
Definition ParticleEvent.h:9