13 protected int m_ParticleID;
16 protected vector m_Orientation;
18 protected bool m_ForceRotationRelativeToWorld;
25 protected vector m_ParticleOrientation;
50 override void InitEffect()
67 override string GetDebugName()
72 identifier = GetParticle().GetDebugNameNative();
76 identifier =
"NO_PARTICLE";
79 return string.Format(
"%1:%2:%3", super.GetDebugName(), m_ParticleID, identifier);
87 override void ValidateStart()
91 ErrorEx(
string.Format(
"No Particle started playing, stopping EffectParticle: %1", GetDebugName()),
ErrorExSeverity.WARNING);
116 override bool IsParticle()
164 return m_ParticleObj;
181 override void Start()
183 if (m_ParticleID > 0)
186 vector ori = GetOrientation();
194 SetParticle(
ParticleManager.GetInstance().CreateParticle(m_ParticleID, pos,
true,
GetParent(), ori, IsParticleRotationRelativeToWorld()));
208 GetParticle().Stop();
227 void AttachTo(
Object obj,
vector local_pos =
"0 0 0",
vector local_ori =
"0 0 0",
bool force_rotation_to_world =
false)
233 ForceParticleRotationRelativeToWorld(force_rotation_to_world);
236 AddAsChild(obj, local_pos, local_ori, force_rotation_to_world);
251 protected void AddAsChild(
Object obj,
vector local_pos,
vector local_ori,
bool force_rotation_to_world)
256 p.AddAsChild(obj, local_pos, local_ori, force_rotation_to_world);
274 void Event_OnPlayStart()
284 void Event_OnPlayStarted()
303 void SetParticleID(
int id )
323 void SetCurrentParticleID(
int id )
338 int GetCurrentParticleID()
343 return p.GetParticleID();
356 override void SetCurrentParent(
Object parent_obj,
bool updateCached =
true )
358 super.SetCurrentParent(parent_obj, updateCached);
367 override Object GetCurrentParent()
372 return Object.Cast(p.GetParent());
374 return super.GetParent();
382 override void SetCurrentPosition(
vector pos,
bool updateCached =
true )
384 super.SetCurrentPosition(pos, updateCached);
396 override vector GetCurrentPosition()
401 return p.GetPosition();
403 return super.GetPosition();
411 override void SetCurrentLocalPosition(
vector pos,
bool updateCached =
true )
413 super.SetCurrentLocalPosition(pos, updateCached);
431 override vector GetCurrentLocalPosition()
440 return parent.WorldToModel(p.GetPosition());
442 return p.GetPosition();
445 return super.GetLocalPosition();
453 void SetOrientation(
vector ori )
472 void SetCurrentOrientation(
vector ori,
bool updateCached =
true )
480 p.SetOrientation(ori);
487 vector GetCurrentOrientation()
492 return p.GetOrientation();
503 void ForceParticleRotationRelativeToWorld(
bool state)
505 m_ForceRotationRelativeToWorld = state;
513 bool IsParticleRotationRelativeToWorld()
518 return p.IsHierarchyPositionOnly();
520 return m_ForceRotationRelativeToWorld;
527 bool IsParticleCurrentRotationRelativeToWorld()
532 return p.IsHierarchyPositionOnly();
562 void SetDecalOwner(
Object o)