DayZ 1.26
DayZ Explorer by KGB
|
Legacy way of using particles in the game. Подробнее...
Защищенные члены | |
Playback | |
Methods regarding playing/stopping of particle | |
override void | PlayParticle (int particle_id=-1) |
Method to tell the particle to start playing. | |
override bool | PlayParticleEx (int particle_id=-1, int flags=0) |
Method to tell the particle to start playing. | |
void | Play (int particle_id=-1) |
Legacy function for backwards compatibility with 1.01 and below. | |
override bool | StopParticle (int flags=0) |
Method to tell the particle to stop playing. | |
void | Stop () |
Legacy function for backwards compatibility with 1.14 and below. | |
Properties and state | |
Obtain information or set properties regarding the state of the Particle | |
void | SetSource (int particle_id) |
Sets particle id. | |
int | GetParticleID () |
Gets particle id. | |
Object | GetDirectParticleEffect () |
Returns direct particle effect entity which is usually handled by this class 'Particle' if there is one. | |
Object | GetParticleParent () |
Returns the parent of this Particle if there is one. | |
bool | HasActiveParticle () |
Returns if there is any particle active. | |
int | GetParticleCount () |
Returns the total count of active particles in all emitors. | |
bool | IsRepeat () |
Returns whether there is a repeating particle. | |
float | GetMaxLifetime () |
Returns the approx. max lifetime. | |
Защищенные статические члены | |
Create a particle (static) | |
You can create a particle either at some position, or create it as a child on some object. | |
static Particle | CreateOnObject (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_world_rotation=false) |
Creates a particle emitter and attaches it on the given object. | |
static Particle | Create (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0") |
Legacy function for backwards compatibility. | |
static Particle | CreateInWorld (int particle_id, vector global_pos, vector global_ori="0 0 0", bool force_world_rotation=false) |
Creates a particle emitter on the given position. | |
static Particle | Create (int particle_id, vector global_pos, vector global_ori="0 0 0") |
Legacy function for backwards compatibility with 1.01 and below. | |
Static play on creation | |
You can use the following Play(...) functions to create and activate a particle in 1 line of your script. | |
static Particle | PlayOnObject (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_world_rotation=false) |
Creates a particle emitter, attaches it on the given object and activates it. | |
static Particle | Play (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0") |
Legacy function for backwards compatibility with 1.01 and below. | |
static Particle | PlayInWorld (int particle_id, vector global_pos) |
Creates a particle emitter on the given position and activates it. | |
static Particle | Play (int particle_id, vector global_pos) |
Legacy function for backwards compatibility with 1.01 and below. | |
Закрытые члены | |
Misc | |
Various helpers | |
void | AddAsChild (Object parent, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_rotation_to_world=false) |
Attaches this particle onto some object. If null value is provided then the particle will be detached from the current parent. | |
Parameter API | |
Helpful methods for getting or setting parameters | |
void | SetParticleParam (int parameter_id, float value) |
Set the value of a parameter of all emitors in the particle. | |
void | SetParameter (int emitter, int parameter, float value) |
Set the value of a parameter of an emitor in the particle. | |
void | GetParameter (int emitter, int parameter, out float value) |
Get the value of a parameter of an emitor in the particle. | |
float | GetParameterEx (int emitter, int parameter) |
Get the value of a parameter of an emitor in the particle. | |
float | GetParameterOriginal (int emitter, int parameter) |
void | ScaleParticleParamFromOriginal (int parameter_id, float coef) |
Scales the given parameter on all emitors relatively to their ORIGINAL value. | |
void | ScaleParticleParam (int parameter_id, float coef) |
Scales the given parameter on all emitors relatively to their CURRENT value. | |
void | IncrementParticleParamFromOriginal (int parameter_id, float value) |
Increments the value of the given parameter relatively from the ORIGINAL value. | |
void | IncrementParticleParam (int parameter_id, float value) |
Increments the value of the given parameter relatively from the CURRENT value. | |
Generic data | |
Generic data for the Particle | |
int | m_ParticleID |
ID from ParticleList if assigned. | |
float | m_Lifetime |
Approx. remaining lifetime of particle. | |
bool | m_IsRepeat |
Whether this particle repeats. | |
bool | m_MarkedForDeletion |
Whether this particle is queued for deletion. | |
Wiggle API | |
Settings to make the Particle wiggle | |
Object | m_ParentObject |
Parent Object the Particle is child of. | |
Object | m_ParticleEffect |
The child object which contains the actual particle. | |
int | m_PreviousFrame |
DEPRECATED. | |
bool | m_WiggleProcessing |
Used for Wiggle API, to signal that wiggle API is currently doing work. | |
bool | m_ForceOrientationRelativeToWorld |
Used for Wiggle API, to restore after unparenting. | |
vector | m_DefaultOri |
Used for Wiggle API, to restore after unparenting. | |
vector | m_DefaultPos |
Used for Wiggle API, to restore after unparenting. | |
vector | m_DefaultWorldOri |
Used for Wiggle API, to restore after unparenting. | |
vector | m_DefaultWorldPos |
Used for Wiggle API, to restore after unparenting. | |
float | m_MaxOriWiggle |
Used for Wiggle API, Wiggle room [-m_MaxOriWiggle, m_MaxOriWiggle]. | |
float | m_MaxOriInterval |
Used for Wiggle API, Interval for wiggling [0, m_MaxOriInterval[. | |
ref Timer | m_RandomizeOri |
Used for Wiggle API, calls the Wiggle functionality. | |
vector | m_GlobalPosPreviousFrame |
DEPRECATED. | |
const int | MAX_EMITORS = 30 |
DEPRECATED | |
void | Particle () |
ctor | |
bool | IsWiggling () |
Checks if particle is currently wiggling. | |
void | SetWiggle (float random_angle, float random_interval) |
Makes the particle change direction by random_angle every random_interval seconds. | |
void | StopWiggle () |
Stops randomized wiggle. | |
void | RandomizeOrientation () |
Randomizes a new orientation and applies it. | |
void | ParticleInit () |
Purely here so that it can be emptied in ParticleSource. | |
vector | RandWiggleVector () |
Helper to get a randomized wiggle vector. | |
float | RandWiggleFloat () |
Helper to get a randomized wiggle float value. | |
Misc Particle specific helpers | |
Functionality specific for Particle | |
void | CreateParticleEffect () |
Creates ParticleEffect child, called from UpdateState. | |
void | DestroyParticleEffect () |
Destroys ParticleEffect child, called from UpdateState. | |
override void | EOnFrame (IEntity other, float timeSlice) |
OnFrame update event decrementing the stored approx. lifetime and checking for deletion. | |
void | OnCheckAutoDelete () |
Creates ParticleEffect child, called from UpdateState. | |
void | OnToDelete () |
Called before deletion from OnCheckAutoDelete. | |
void | UpdateState () |
Creates/Destroys ParticleEffect child according to current state. | |
Legacy way of using particles in the game.
ctor
Перекрестные ссылки ParticleInit().
|
inlineprivate |
Attaches this particle onto some object. If null value is provided then the particle will be detached from the current parent.
parent | Object Parent onto which this particle will be attached |
local_pos | vector Attachment position local to the parent (optional) |
local_ori | vector Orientation local to the parent (Pitch, Yawn, Roll in degrees) (Optional) |
force_rotation_to_world | bool Force rotation to be in WS (Optional) |
Перекрестные ссылки AddChild(), m_DefaultPos, m_ForceOrientationRelativeToWorld, m_ParentObject, m_ParticleEffect и SetPosition().
Используется в RandomizeOrientation().
|
inlinestaticprotected |
Legacy function for backwards compatibility.
Перекрестные ссылки CreateOnObject() и particle_id.
|
inlinestaticprotected |
Legacy function for backwards compatibility with 1.01 and below.
Перекрестные ссылки CreateInWorld() и particle_id.
|
inlinestaticprotected |
Creates a particle emitter on the given position.
particle_id | int Particle ID registered in ParticleList |
global_pos | Vector Position where the particel will be created |
global_ori | vector Orientation (Pitch, Yawn, Roll in degrees) (Optional) |
force_world_rotation | bool Forces particle's orientation to rotate relative to the world and not with the object (Optional) |
Particle
Created particle instance Перекрестные ссылки ECE_LOCAL, GetGame() и particle_id.
Используется в Create(), CreateOnObject() и PlayInWorld().
|
inlinestaticprotected |
Creates a particle emitter and attaches it on the given object.
particle_id | int Particle ID registered in ParticleList |
parent_obj | Object Instance on which this particle will be attached |
local_pos | vector Attachment position local to the parent (Optional) |
local_ori | vector Orientation local to the parent (Pitch, Yawn, Roll in degrees) (Optional) |
force_world_rotation | bool Forces particle's orientation to rotate relative to the world and not with the object (Optional) |
Particle
Created particle instance Перекрестные ссылки CreateInWorld(), Error(), particle_id и Vector().
Используется в Create() и PlayOnObject().
|
inlineprivate |
Creates ParticleEffect child, called from UpdateState.
Перекрестные ссылки AddChild(), ECE_LOCAL, ErrorEx, GetGame(), GetMaxLifetime(), GetObject(), ParticleList::GetParticleFullPath(), IsRepeat(), m_ForceOrientationRelativeToWorld, m_IsPlaying, m_IsRepeat, m_Lifetime, m_ParticleEffect, m_ParticleID, ReleaseObject() и vector::Zero.
Используется в UpdateState().
|
inlineprivate |
Destroys ParticleEffect child, called from UpdateState.
Перекрестные ссылки GetGame(), m_IsRepeat, m_ParticleEffect и SetParameter().
Используется в UpdateState().
OnFrame update event decrementing the stored approx. lifetime and checking for deletion.
Перекрестные ссылки m_Lifetime и OnCheckAutoDelete().
|
inlineprotected |
Returns direct particle effect entity which is usually handled by this class 'Particle' if there is one.
Перекрестные ссылки m_ParticleEffect.
Используется в FlammableBase::UpdateLight().
|
inlineprotected |
Returns the approx. max lifetime.
float
The largest lifetime sum among the emitors Перекрестные ссылки GetParticleEmitorCount(), GetParticleParm() и m_ParticleEffect.
Используется в CreateParticleEffect() и OnCheckAutoDelete().
Get the value of a parameter of an emitor in the particle.
emitter | int The emitor to get the value from |
parameter | int The parameter to get the value from (enum EmitorParam) |
value | float The value |
Перекрестные ссылки GetParticleParm() и m_ParticleEffect.
Get the value of a parameter of an emitor in the particle.
emitter | int The emitor to get the value from |
parameter | int The parameter to get the value from (enum EmitorParam) |
float
The value Перекрестные ссылки GetParticleParm() и m_ParticleEffect.
Перекрестные ссылки GetParticleParmOriginal() и m_ParticleEffect.
|
inlineprotected |
Returns the total count of active particles in all emitors.
int
Total count of active particles Перекрестные ссылки m_ParticleEffect и ParticleGetCount().
Используется в OnCheckAutoDelete().
|
inlineprotected |
Gets particle id.
int
The last set Particle ID registered in ParticleList Перекрестные ссылки m_ParticleID.
Используется в FlammableBase::UpdateParticle().
|
inlineprotected |
Returns the parent of this Particle if there is one.
Object
The registered parent or null Перекрестные ссылки m_ParentObject.
|
inlineprotected |
Returns if there is any particle active.
bool
Whether there is any particle active Перекрестные ссылки m_ParticleEffect и ParticleHasActive().
Increments the value of the given parameter relatively from the CURRENT value.
parameter_id | int The parameter to adjust (enum EmitorParam) |
value | float The value to sum |
Перекрестные ссылки GetParticleEmitorCount(), GetParticleParm(), m_ParticleEffect и SetParticleParm().
Increments the value of the given parameter relatively from the ORIGINAL value.
parameter_id | int The parameter to adjust (enum EmitorParam) |
value | float The value to sum |
Перекрестные ссылки GetParticleEmitorCount(), GetParticleParmOriginal(), m_ParticleEffect и SetParticleParm().
|
inlineprotected |
Returns whether there is a repeating particle.
bool
whether there is a repeating particle Перекрестные ссылки GetParticleEmitorCount(), GetParticleParm() и m_ParticleEffect.
Используется в CreateParticleEffect() и OnCheckAutoDelete().
|
inlineprivate |
Checks if particle is currently wiggling.
Перекрестные ссылки m_RandomizeOri.
Используется в ParticleSource::OnParticleStop(), ParticleSource::OnParticleUnParented(), ParticleSource::SetWiggle() и ParticleSource::StopWiggle().
|
inlineprivate |
Creates ParticleEffect child, called from UpdateState.
Перекрестные ссылки GetMaxLifetime(), GetParticleCount(), IsRepeat(), m_IsRepeat, m_Lifetime, m_MarkedForDeletion, m_ParticleEffect, OnParticleEnd(), OnParticleStop() и OnToDelete().
Используется в EOnFrame().
|
inlineprivate |
|
inlineprotected |
Purely here so that it can be emptied in ParticleSource.
Перекрестные ссылки SetFlags().
Используется в Particle().
|
inlinestaticprotected |
Legacy function for backwards compatibility with 1.01 and below.
Перекрестные ссылки particle_id и PlayOnObject().
Legacy function for backwards compatibility with 1.01 and below.
Перекрестные ссылки particle_id и PlayInWorld().
Legacy function for backwards compatibility with 1.01 and below.
particle_id | int Particle ID registered in ParticleList to start playing |
Перекрестные ссылки particle_id и PlayParticle().
Creates a particle emitter on the given position and activates it.
particle_id | int Particle ID registered in ParticleList |
global_pos | Vector Position where the particel will be created |
Particle
Created particle instance Перекрестные ссылки CreateInWorld() и particle_id.
Используется в Play().
|
inlinestaticprotected |
Creates a particle emitter, attaches it on the given object and activates it.
particle_id | int Particle ID registered in ParticleList |
parent_obj | Object Instance on which this particle will be attached |
local_pos | vector Attachment position local to the parent (Optional) |
local_ori | vector Orientation local to the parent (Pitch, Yaw, Roll in degrees) (Optional) |
force_world_rotation | bool Forces particle's orientation to rotate relative to the world and not with the object (Optional) |
Particle
Created particle instance Перекрестные ссылки CreateOnObject() и particle_id.
Используется в Play().
Method to tell the particle to start playing.
particle_id | int Particle ID registered in ParticleList to start playing |
Перекрестные ссылки particle_id и PlayParticleEx().
Используется в Play().
Method to tell the particle to start playing.
particle_id | int Particle ID registered in ParticleList to start playing |
flags | int Flags to pass to the playing (None on this level) |
bool
Whether the particle successfully started Перекрестные ссылки OnParticleStart(), particle_id, SetSource() и UpdateState().
Используется в PlayParticle().
|
inlineprivate |
Randomizes a new orientation and applies it.
Перекрестные ссылки AddAsChild(), m_DefaultOri, m_DefaultPos, m_MaxOriInterval, m_ParentObject, m_RandomizeOri, m_WiggleProcessing, Math::RandomFloat() и RandWiggleVector().
|
inlineprotected |
Helper to get a randomized wiggle float value.
Перекрестные ссылки m_MaxOriWiggle и Math::RandomFloatInclusive().
Используется в RandWiggleVector().
|
inlineprotected |
Helper to get a randomized wiggle vector.
Перекрестные ссылки RandWiggleFloat() и Vector().
Используется в RandomizeOrientation() и ParticleSource::RandomizeOrientation().
Scales the given parameter on all emitors relatively to their CURRENT value.
parameter_id | int The parameter to adjust (enum EmitorParam) |
coef | float The multiplier to apply |
Перекрестные ссылки GetParticleEmitorCount(), GetParticleParm(), m_ParticleEffect и SetParticleParm().
Scales the given parameter on all emitors relatively to their ORIGINAL value.
parameter_id | int The parameter to adjust (enum EmitorParam) |
coef | float The multiplier to apply |
Перекрестные ссылки GetParticleEmitorCount(), GetParticleParmOriginal(), m_ParticleEffect и SetParticleParm().
Используется в BroomBase::UpdateParticle() и FlammableBase::UpdateParticle().
Set the value of a parameter of an emitor in the particle.
emitter | int The emitter to apply the new value to, -1 for all emitter |
parameter | int The parameter to apply the new value to (enum EmitorParam) |
value | float The value to apply |
Перекрестные ссылки m_ParticleEffect и SetParticleParm().
Используется в ManBase::ContaminatedParticleAdjustment(), CreateParticle(), DestroyParticleEffect(), ParticleNormalSmokeStart(), ParticleSmallSmokeStart(), PlayVFX(), ManBase::SetContaminatedEffectEx(), FlareSimulation::Simulate() и FlareSimulation::TurnOffDistantLight().
Set the value of a parameter of all emitors in the particle.
parameter | int The parameter to apply the new value to (enum EmitorParam) |
value | float The value to apply |
Перекрестные ссылки m_ParticleEffect и SetParticleParm().
Используется в Update() и EffectBoatWaterBack::Update().
Sets particle id.
particle_id | int Particle ID registered in ParticleList to start playing |
Перекрестные ссылки m_ParticleID и particle_id.
Используется в PlayParticleEx().
Makes the particle change direction by random_angle every random_interval seconds.
random_angle | float Will be the range [-random_angle, random_angle[ to wiggle between |
random_interval | float Will be the time range [0, random_interval] to wiggle next time |
Перекрестные ссылки CALL_CATEGORY_GAMEPLAY, m_MaxOriInterval, m_MaxOriWiggle, m_RandomizeOri, Math::RandomFloat() и StopWiggle().
Используется в CupidsBoltSimulation::OnFire(), SmokeSimulation::OnFire(), Ammo_40mm_Smoke_ColorBase::OnVariablesSynchronized(), PlayVFX() и Roadflare::UpdateActiveParticles().
|
inlineprotected |
Legacy function for backwards compatibility with 1.14 and below.
Перекрестные ссылки StopParticle().
Используется в DynamicArea_Flare::EEDelete(), House::EEDelete(), BuildingSuper::EEDelete(), Edible_Base::EEDelete(), Ammo_40mm_Smoke_ColorBase::EEDelete(), ItemBase::EEDelete(), HotSpringTrigger::EEDelete(), VolcanicTrigger::EEDelete(), FlareSimulation::OnActivation(), FireworksLauncherClientEvent::OnExplode(), CupidsBoltSimulation::OnFire(), OnInventoryEnter(), FlammableBase::OnWorkStop(), FryingPan::ParticleCookingStop(), ManBase::SetContaminatedEffectEx(), EffectParticle::Stop(), FlammableBase::StopAllParticles(), FlammableBase::UpdateParticle(), Edible_Base::UpdateVaporParticle(), CupidsBoltSimulation::~CupidsBoltSimulation(), DestructionEffectBase::~DestructionEffectBase(), ~EasterEgg(), FlareSimulation::~FlareSimulation() и SmokeSimulation::~SmokeSimulation().
Method to tell the particle to stop playing.
flags | int Flags to pass to the stopping (None on this level) |
bool
Whether the particle successfully stopped Перекрестные ссылки GetParent(), GetPosition, OnParticleStop(), SetPosition() и UpdateState().
Используется в Stop().
|
inlineprivate |
Stops randomized wiggle.
Перекрестные ссылки m_MaxOriInterval, m_MaxOriWiggle и m_RandomizeOri.
Используется в SetWiggle().
|
inlineprotected |
Creates/Destroys ParticleEffect child according to current state.
Перекрестные ссылки CreateParticleEffect(), DestroyParticleEffect(), m_IsPlaying и m_ParticleEffect.
Используется в PlayParticleEx() и StopParticle().
|
private |
Used for Wiggle API, to restore after unparenting.
Используется в ParticleSource::OnParticleUnParented(), RandomizeOrientation(), ParticleSource::RandomizeOrientation(), ParticleSource::SetWiggle() и ParticleSource::StopWiggle().
|
private |
Used for Wiggle API, to restore after unparenting.
Используется в AddAsChild(), ParticleSource::OnParticleUnParented(), RandomizeOrientation(), ParticleSource::RandomizeOrientation(), ParticleSource::SetWiggle() и ParticleSource::StopWiggle().
|
private |
Used for Wiggle API, to restore after unparenting.
Используется в ParticleSource::OnParticleUnParented() и ParticleSource::SetWiggle().
|
private |
Used for Wiggle API, to restore after unparenting.
Используется в ParticleSource::OnParticleUnParented() и ParticleSource::SetWiggle().
|
private |
Used for Wiggle API, to restore after unparenting.
Используется в AddAsChild(), CreateParticleEffect(), ParticleSource::RandomizeOrientation(), ParticleSource::SetWiggle() и ParticleSource::StopWiggle().
|
private |
DEPRECATED.
|
protected |
Whether this particle repeats.
Используется в CreateParticleEffect(), DestroyParticleEffect() и OnCheckAutoDelete().
|
protected |
Approx. remaining lifetime of particle.
Используется в CreateParticleEffect(), EOnFrame() и OnCheckAutoDelete().
|
private |
Whether this particle is queued for deletion.
Используется в OnCheckAutoDelete().
|
private |
Used for Wiggle API, Interval for wiggling [0, m_MaxOriInterval[.
Используется в ParticleSource::OnParticleUnParented(), RandomizeOrientation(), ParticleSource::RandomizeOrientation(), SetWiggle(), ParticleSource::SetWiggle() и StopWiggle().
|
private |
Used for Wiggle API, Wiggle room [-m_MaxOriWiggle, m_MaxOriWiggle].
Используется в ParticleSource::OnParticleUnParented(), RandWiggleFloat(), SetWiggle(), ParticleSource::SetWiggle() и StopWiggle().
|
protected |
Parent Object the Particle is child of.
Используется в AddAsChild(), GetParticleParent(), ParticleSource::OnParticleParented(), ParticleSource::OnParticleUnParented() и RandomizeOrientation().
|
protected |
The child object which contains the actual particle.
Используется в AddAsChild(), CreateParticleEffect(), DestroyParticleEffect(), GetDirectParticleEffect(), GetMaxLifetime(), GetParameter(), GetParameterEx(), GetParameterOriginal(), GetParticleCount(), HasActiveParticle(), IncrementParticleParam(), IncrementParticleParamFromOriginal(), IsRepeat(), OnCheckAutoDelete(), ParticleSource::ParticleSource(), ScaleParticleParam(), ScaleParticleParamFromOriginal(), SetParameter(), SetParticleParam() и UpdateState().
|
protected |
ID from ParticleList if assigned.
Используется в CreateParticleEffect(), GetParticleID() и SetSource().
|
protected |
DEPRECATED.
Used for Wiggle API, calls the Wiggle functionality.
Используется в IsWiggling(), ParticleSource::OnParticleStop(), RandomizeOrientation(), ParticleSource::RandomizeOrientation(), SetWiggle() и StopWiggle().
|
private |
Used for Wiggle API, to signal that wiggle API is currently doing work.
Используется в ParticleSource::OnParticleUnParented(), RandomizeOrientation() и ParticleSource::RandomizeOrientation().