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

◆ PlayOnObject()

static int SEffectManager::PlayOnObject ( notnull Effect eff,
Object obj,
vector local_pos = "0 0 0",
vector local_ori = "0 0 0",
bool force_rotation_relative_to_world = false )
inlinestaticprotected

Play an Effect.

Предупреждения
Read PlayInWorld warning
Аргументы
effEffect The Effect to play
objObject The parent of the Effect
local_posvector The local position to play the Effect in relation to the parent (Optional)
local_orivector The local orientation to play the Effect in relation to the parent (Optional)
force_rotation_relative_to_worldbool Whether to force the orientation to stay in WS (Optional)
Возвращает
int The registered ID of the Effect

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

71 {
72 // Stop the effect first, just in case
73 eff.Stop();
74
75 int id;
76
77 if (eff.IsRegistered())
78 {
79 id = eff.GetID();
80 }
81 else
82 {
83 id = EffectRegister(eff);
84 }
85
86 if (!obj)
87 {
88 ErrorEx("Parent object is null.", ErrorExSeverity.WARNING);
89 eff.SetPosition(local_pos);
90 }
91 else
92 {
93 eff.SetPosition(obj.GetPosition());
94 }
95
96 eff.SetParent(obj);
97 eff.SetLocalPosition(local_pos);
98 eff.SetAttachedLocalOri(local_ori);
99
100 if (force_rotation_relative_to_world)
101 {
102 EffectParticle eff_particle = EffectParticle.Cast(eff);
103
104 if (eff_particle)
105 {
106 eff_particle.ForceParticleRotationRelativeToWorld(force_rotation_relative_to_world);
107 }
108 }
109
110 eff.Start();
111
112 return id;
113 }
void ForceParticleRotationRelativeToWorld(bool state)
Set orientation setting to be used by the effect when the Effect starts.
Определения EffectParticle.c:542
static int EffectRegister(Effect effect)
Registers Effect in SEffectManager.
Определения EffectManager.c:331
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx

Перекрестные ссылки Effect(), EffectRegister(), ErrorEx и EffectParticle::ForceParticleRotationRelativeToWorld().

Используется в DustEffectManager::CreateCloudEffect(), VehicleVFXComponent::PlayEffectData(), ManBase::SetDecayEffects(), EffectParticle::Start() и ItemBase::StartLoopSound().