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

◆ CreateParticleEx()

static ParticleSource ParticleSource::CreateParticleEx ( int id,
vector pos,
int flags = ParticlePropertiesFlags.NONE,
Object parent = null,
vector ori = vector.Zero,
Class owner = null )
inlinestaticprotected

Master create function.

Аргументы
idint Particle ID registered in ParticleList
posvector Position of ParticleSource in LS (WS when no parent)
flagsint See ParticlePropertiesFlags (Optional)
parentObject Parent Object which will child the ParticleSource (Optional)
orivector Orientation of ParticleSource in LS (WS when no parent) (Pitch, Yaw, Roll in degrees) (Optional)
ownerClass The owning instance for this particle (Optional)
Возвращает
ParticleSource Created particle instance when successful

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

206 {
207 string particlePath = ParticleList.GetParticleFullPath(id);
208 if (particlePath == "") // There is already an error inside of ParticleList signaling this
209 {
210 ErrorEx(string.Format("Could not create ParticleSource as particle id %1 is invalid.", id));
211 return null;
212 }
213
214 vector localPos = pos;
215
216 if (parent)
217 pos = parent.GetPosition();
218
219 ParticleSource p = ParticleSource.Cast( GetGame().CreateObjectEx("ParticleSource", pos, ECE_LOCAL) );
220 p.SetParticle(particlePath);
221 ParticleProperties props = new ParticleProperties(localPos, flags, parent, ori, owner);
222 p.ApplyProperties(props);
223
224 return p;
225 }
const int ECE_LOCAL
Определения CentralEconomy.c:24
void ParticleSource()
ctor
Определения ParticleSource.c:126
bool ApplyProperties(ParticleProperties properties)
Applies the properties given to the ParticleSource.
Определения ParticleSource.c:547
bool SetParticle(string path)
Assigns a particle to the ParticleSource.
Определения ParticleSource.c:444
proto native CGame GetGame()
enum ShapeType ErrorEx

Перекрестные ссылки ApplyProperties(), ECE_LOCAL, ErrorEx, GetGame(), ParticleList::GetParticleFullPath(), ParticleSource() и SetParticle().

Используется в CreateParticle().