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
7
class
plParticleEffectInstance
;
8
class
plParticleEventReaction
;
9
11
class
PL_PARTICLEPLUGIN_DLL
plParticleEventReactionFactory
:
public
plReflectedClass
12
{
13
PL_ADD_DYNAMIC_REFLECTION(
plParticleEventReactionFactory
,
plReflectedClass
);
14
15
public
:
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
28
class
PL_PARTICLEPLUGIN_DLL
plParticleEventReaction
:
public
plReflectedClass
29
{
30
PL_ADD_DYNAMIC_REFLECTION(
plParticleEventReaction
,
plReflectedClass
);
31
32
friend
class
plParticleEventReactionFactory
;
33
friend
class
plParticleEffectInstance
;
34
35
protected
:
36
plParticleEventReaction
();
37
~plParticleEventReaction
();
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
};
plParticleEffectInstance
Definition
ParticleEffectInstance.h:25
plParticleEventReactionFactory
Base class for all particle event reactions.
Definition
ParticleEventReaction.h:12
plParticleEventReaction
Definition
ParticleEventReaction.h:29
plRTTI
This class holds information about reflected types. Each instance represents one type that is known t...
Definition
RTTI.h:30
plReflectedClass
All classes that should be dynamically reflectable, need to be derived from this base class.
Definition
DynamicRTTI.h:86
plStreamReader
Interface for binary in (read) streams.
Definition
Stream.h:22
plStreamWriter
Interface for binary out (write) streams.
Definition
Stream.h:107
plTempHashedString
A class to use together with plHashedString for quick comparisons with temporary strings that need no...
Definition
HashedString.h:151
plHybridString< 32, plDefaultAllocatorWrapper >
plParticleEvent
Definition
ParticleEvent.h:9
Code
EnginePlugins
ParticlePlugin
Events
ParticleEventReaction.h
Generated by
1.11.0