Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
particlebase.c
Go to the documentation of this file.
1 
16 {
22  ref ScriptInvoker Event_OnParticleStart = new ScriptInvoker();
28  ref ScriptInvoker Event_OnParticleStop = new ScriptInvoker();
34  ref ScriptInvoker Event_OnParticleReset = new ScriptInvoker();
41  ref ScriptInvoker Event_OnParticleEnd = new ScriptInvoker();
46  ref ScriptInvoker Event_OnParticleParented = new ScriptInvoker();
51  ref ScriptInvoker Event_OnParticleUnParented = new ScriptInvoker();
52 }
53 
60 class ParticleBase : Entity
61 {
63  protected bool m_IsPlaying;
64 
67 
68 
69 
71  void ParticleBase()
72  {
74  }
75 
76 
77 
79  override bool IsParticle()
80  {
81  return true;
82  }
83 
84 
85 
90 
96  void PlayParticle(int particle_id = -1)
97  {
98  ErrorEx("Not implemented.", ErrorExSeverity.WARNING);
99  }
100 
107  bool PlayParticleEx(int particle_id = -1, int flags = 0)
108  {
109  ErrorEx("Not implemented.", ErrorExSeverity.WARNING);
110  return false;
111  }
112 
118  bool StopParticle(int flags = 0)
119  {
120  ErrorEx("Not implemented.", ErrorExSeverity.WARNING);
121  return false;
122  }
123 
129  {
130  ErrorEx("Not implemented.", ErrorExSeverity.WARNING);
131  return false;
132  }
133 
139  {
140  ErrorEx("Not implemented.", ErrorExSeverity.WARNING);
141  return false;
142  }
143 
149  {
150  ErrorEx("Not implemented.", ErrorExSeverity.WARNING);
151  return false;
152  }
153 
155 
156 
157 
163  {
164  return m_EventInvokers;
165  }
166 
167 
168 
175 
179  protected void OnParticleStart()
180  {
181  m_IsPlaying = true;
182  GetEvents().Event_OnParticleStart.Invoke(this);
183  }
184 
188  protected void OnParticleStop()
189  {
190  m_IsPlaying = false;
191  GetEvents().Event_OnParticleStop.Invoke(this);
192  }
193 
197  protected void OnParticleReset()
198  {
199  GetEvents().Event_OnParticleReset.Invoke(this);
200  }
201 
206  protected void OnParticleEnd()
207  {
208  GetEvents().Event_OnParticleEnd.Invoke(this);
209  }
210 
214  protected void OnParticleParented(IEntity parent)
215  {
216  GetEvents().Event_OnParticleParented.Invoke(this);
217  }
218 
222  protected void OnParticleUnParented(IEntity parent)
223  {
224  GetEvents().Event_OnParticleUnParented.Invoke(this);
225  }
226 
228 }
OnParticleParented
protected void OnParticleParented(IEntity parent)
Event when the particle receives a parent.
Definition: particlebase.c:214
OnParticleReset
protected void OnParticleReset()
Event when the particle is restarted.
Definition: particlebase.c:197
StopParticle
bool StopParticle(int flags=0)
Method to tell the particle to stop playing.
Definition: particlebase.c:118
ResetParticle
bool ResetParticle()
Method to tell the particle to reset.
Definition: particlebase.c:128
particle_id
int particle_id
Definition: smokesimulation.c:3
ParticleBase
void ParticleBase()
ctor
Definition: particlebase.c:71
IsParticle
override bool IsParticle()
Have script recognize this as a Particle without casting.
Definition: particlebase.c:79
ParticleEvents
Invokers for ParticleBase events, called from events.
Definition: particlebase.c:15
m_IsPlaying
class ParticleEvents m_IsPlaying
Engine base class with internal functionality.
RestartParticle
bool RestartParticle()
Method to tell the particle to restart (reset + play)
Definition: particlebase.c:138
IsParticlePlaying
bool IsParticlePlaying()
Ask if the particle is still playing.
Definition: particlebase.c:148
OnParticleStart
protected void OnParticleStart()
Event when the particle starts.
Definition: particlebase.c:179
OnParticleUnParented
protected void OnParticleUnParented(IEntity parent)
Event when the particle is orphaned.
Definition: particlebase.c:222
OnParticleEnd
protected void OnParticleEnd()
Event when the particle ends.
Definition: particlebase.c:206
ErrorEx
enum ShapeType ErrorEx
IEntity
Definition: enentity.c:164
PlayParticle
void PlayParticle(int particle_id=-1)
Method to tell the particle to start playing.
Definition: particlebase.c:96
OnParticleStop
protected void OnParticleStop()
Event when the particle stops.
Definition: particlebase.c:188
ErrorExSeverity
ErrorExSeverity
Definition: endebug.c:61
GetEvents
ParticleEvents GetEvents()
Get the events.
Definition: particlebase.c:162
Entity
Definition: camera.c:1
m_EventInvokers
protected ref ParticleEvents m_EventInvokers
Event invokers.
Definition: particlebase.c:66
PlayParticleEx
bool PlayParticleEx(int particle_id=-1, int flags=0)
Method to tell the particle to start playing.
Definition: particlebase.c:107
ScriptInvoker
ScriptInvoker Class provide list of callbacks usage:
Definition: tools.c:115