DayZ 1.30
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 строка 209

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

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

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