Перечисления | |
| enum | EffectType |
| Enum to determine what type of effect the Effect is. Подробнее... | |
Функции | |
EffectType | |
Information about what type of effect the Effect is, without the need for casting | |
| EffectType | GetEffectType () |
| Get what type of effect the Effect is. | |
| bool | IsSound () |
| Check whether the Effect is EffectSound without casting. | |
| bool | IsParticle () |
| Check whether the Effect is EffectParticle without casting. | |
Playback | |
Methods to Play/Stop Effect Generally, SEffectManager.Play methods are used instead of Start | |
| void | Start () |
| Plays all elements this effects consists of. | |
| void | ValidateStart () |
| Validation whether an effect truly started playing or if the Effect should stop as none is present. | |
| void | Stop () |
| Stops all elements this effect consists of. | |
| bool | IsPlaying () |
| Returns true when the Effect is playing, false otherwise. | |
Destroy | |
Methods regarding automatic cleanup | |
| void | Destroy () |
| Cleans up the Effect, including unregistering if needed. | |
| void | SetAutodestroy (bool auto_destroy) |
| Sets whether Effect automatically cleans up when it stops. | |
| bool | IsAutodestroy () |
| Get whether Effect automatically cleans up when it stops. | |
| bool | IsPendingDeletion () |
| Get whether the Effect is queued up for being cleaned up. | |
| bool | CanDestroy () |
| Get whether the Effect can be destroyed right now. | |
| void | SetEnableEventFrame (bool enable) |
| Enable Event_OnFrameUpdate for the effect. | |
Events | |
Various events that can be overriden for custom behaviour | |
| void | Event_OnFrameUpdate (float time_delta) |
| Event called on frame when enabled by SetEnableEventFrame(true) | |
| void | Event_OnRegistered (int id) |
| Event called from SEffectManager when the Effect is registered. | |
| void | Event_OnUnregistered () |
| Event called from SEffectManager when the Effect is unregistered. | |
| void | OnCheckUpdate () |
| Event used when EffectParticle.CheckLifeSpan was called (DEPRECATED) | |
Generic API | |
Setters and getters for generic data and properties | |
| void | SetParent (Object parent_obj, int pivot) |
| Set parent of the Effect. | |
| void | SetParent (Object parent_obj) |
| Set parent of the Effect. | |
| Object | GetParent () |
| Get parent of the Effect. | |
| int | GetPivotIndex () |
| Get parent pivot of the Effect, only valid when there is some GetParent. | |
| void | SetCurrentParent (Object parent_obj, bool updateCached=true) |
| Set current parent of the managed effect. | |
| Object | GetCurrentParent () |
| Get the current parent of the managed Effect. | |
| void | SetPosition (vector pos) |
| Set the world position of the Effect. | |
| vector | GetPosition () |
| Get the world position of the Effect. | |
| void | SetCurrentPosition (vector pos, bool updateCached=true) |
| Set the current world position of the managed effect. | |
| vector | GetCurrentPosition () |
| Get the current world position of the managed effect. | |
| void | SetLocalPosition (vector pos) |
| Set the local position of the Effect. | |
| vector | GetLocalPosition () |
| Get the local position of the Effect. | |
| void | SetCurrentLocalPosition (vector pos, bool updateCached=true) |
| Set the current local position of the managed effect. | |
| vector | GetCurrentLocalPosition () |
| Get the current local position of the managed effect. | |
Effect ID | |
The ID of the effect when registered in SEffectManager | |
| void | SetID (int id) |
| Set the ID registered in SEffectManager. | |
| int | GetID () |
| Get the ID registered in SEffectManager. | |
| bool | IsRegistered () |
| Get whether this Effect is registered in SEffectManager. | |
Attachment API | |
Data to attach an Effect to a parent Mostly replaced by equivalents without 'Attachment' in name Mildly deprecated, exist for backwards compatibility | |
| void | SetAttachmentParent (Object obj) |
| Set parent for the Effect. | |
| Object | GetAttachmentParent () |
| Get the parent set by SetAttachmentParent. | |
| void | SetAttachedLocalPos (vector pos) |
| Set local pos for the Effect relative to the parent. | |
| vector | GetAttachedLocalPos () |
| Get the local pos set by SetAttachedLocalPos. | |
| void | SetAttachedLocalOri (vector ori) |
| Set local orientation for the Effectparticle to attach to when the Effect is started. | |
| vector | GetAttachedLocalOri () |
| Get the local orientation set by SetAttachedLocalOri. | |
Переменные | |
| NONE | |
| Plain Effect base. | |
| SOUND | |
| EffectSound. | |
| PARTICLE | |
| EffectParticle. | |
Event invokers | |
Base wrapper class for managing effects (Particles, Sound) through SEffectManager
ScriptInvonkers for certain events | |
| Event_OnStarted () = new ScriptInvoker() | |
| Event used when Start was called. | |
| ref ScriptInvoker | Event_OnStopped () = new ScriptInvoker() |
| Event used when Stop was called. | |
| ref ScriptInvoker | Event_OnEffectStarted () = new ScriptInvoker() |
| Event used when the actual effect started playing. | |
| ref ScriptInvoker | Event_OnEffectEnded () = new ScriptInvoker() |
| Event used when the actual effect stopped playing. | |
Generic data | |
Generic data for the Effect | |
| bool | m_IsAutodestroy |
| Whether the Effect cleans up after itself when stopped. | |
| bool | m_IsPendingDeletion |
| Whether the Destroy process has already been called. | |
| bool | m_IsPlaying |
| Whether the Effect is currently playing. | |
| Object | m_ParentObject |
| Cached parent. | |
| int | m_PivotIndex = -1 |
| Cached parent pivot id. | |
| vector | m_Position |
| Cached world position. | |
SEffectManager data | |
Data filled in by SEffectManager to identify it when it is registered | |
| int | m_ID |
| ID of effect, given by SEffectManager when registered (automatically done when playing through it) | |
| bool | m_IsRegistered |
| Whether the effect is registered in SEffectManager. | |
Attachment data | |
Cached settings set through 'SetAttachment...' methods Does not necessarily reflect the current state when EffectParticle | |
| vector | m_LocalPos |
| Cached local pos. | |
| vector | m_LocalOri |
| Local orientation set by SetAttachedLocalOri, only used by EffectParticle. | |
| void | Effect () |
| ctor | |
| void | ~Effect () |
| dtor | |
| void | InitEffect () |
| init | |