DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ CreateParticleEffect()

void Particle::CreateParticleEffect ( )
inlineprivate

Creates ParticleEffect child, called from UpdateState.

См. определение в файле Particle.c строка 440

441 {
442 if ( !GetGame().IsServer() || !GetGame().IsMultiplayer() )
443 {
444 string fullPath = ParticleList.GetParticleFullPath(m_ParticleID);
445 if (fullPath == "")
446 {
447 ErrorEx("Could not play Particle as there is no valid particle id assigned.");
448 m_IsPlaying = false;
449 return;
450 }
451
452 if ( m_ParticleEffect == null )
453 {
454 m_ParticleEffect = GetGame().CreateObjectEx("#particlesourceenf", vector.Zero, ECE_LOCAL); // particle source must be lowercase!
455 }
456
458
459 vobject vobj = GetObject( fullPath );
460 m_ParticleEffect.SetObject(vobj, "");
461 ReleaseObject(vobj);
462
465 }
466 }
Object GetObject()
Определения ActionTargets.c:122
const int ECE_LOCAL
Определения CentralEconomy.c:24
bool m_IsPlaying
Whether the Effect is currently playing.
Определения Effect.c:37
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
bool m_IsRepeat
Whether this particle repeats.
Определения Particle.c:17
float GetMaxLifetime()
Returns the approx. max lifetime.
Определения Particle.c:380
Object m_ParticleEffect
The child object which contains the actual particle.
Определения Particle.c:50
bool m_ForceOrientationRelativeToWorld
Used for Wiggle API, to restore after unparenting.
Определения Particle.c:29
float m_Lifetime
Approx. remaining lifetime of particle.
Определения Particle.c:15
int m_ParticleID
ID from ParticleList if assigned.
Определения Particle.c:13
bool IsRepeat()
Returns whether there is a repeating particle.
Определения Particle.c:354
proto native CGame GetGame()
enum ShapeType ErrorEx
proto native void ReleaseObject(vobject object, int flag=0)
proto native void AddChild(Widget child, bool immedUpdate=true)
int[] vobject
Определения proto.c:46

Перекрестные ссылки AddChild(), CGame::CreateObjectEx(), 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().