|
Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
|
Go to the documentation of this file.
22 static const int POOL_SIZE = 10000;
74 static void CleanupInstance()
113 int flags = ParticlePropertiesFlags.NONE;
117 flags = flags | ParticlePropertiesFlags.PLAY_ON_CREATION;
120 if (forceWorldRotation)
122 flags = flags | ParticlePropertiesFlags.FORCE_WORLD_ROT;
140 string particlePath =
ParticleList.GetParticleFullPath(
id);
141 if (particlePath ==
"")
143 ErrorEx(
string.Format(
"Could not create ParticleSource as particle id %1 is invalid.",
id));
147 ParticleProperties props =
new ParticleProperties(pos, flags, parent, ori, owner);
164 vector local_pos =
"0 0 0",
165 vector local_ori =
"0 0 0",
166 bool force_world_rotation =
false )
286 if (tempArr.Count() > 0)
329 if (tempArr.Count() > 0)
370 if (tempArr.Count() > 0)
451 proto native
static int GetStaticCount();
457 proto native
static int GetStaticActiveCount();
539 GetEvents().Event_OnAllocation.Invoke(
this, allocatedParticles);
544 GetEvents().Event_OnAllocationEnd.Invoke(
this);
proto native CGame GetGame()
ParticleSource CreateParticleEx(int id, vector pos, int flags=ParticlePropertiesFlags.NONE, Object parent=null, vector ori=vector.Zero, Class owner=null)
Master create function.
override string GetDebugName()
Gets the debug name for the ParticleManager.
@ BLOCKING
Allocation blocks the game until it is done.
proto native void SetName(string name)
Set a name for the ParticleManager to identify it more easily.
ParticleSource PlayInWorldEx(int particle_id, Object parent_obj, vector global_pos, vector global_ori="0 0 0", bool force_world_rotation=false)
ParticleSource CreateParticle(int id, vector pos, bool playOnCreation=false, Object parent=null, vector ori=vector.Zero, bool forceWorldRotation=false, Class owner=null)
Create function.
private proto void SetScriptEvents(Managed events)
Set the events.
ParticleSource 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.
ParticleSource 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.
Class simply to have easily modded constants.
ParticleSource 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.
@ REUSE_OWNED
Reuse stopped particles even if they are owned by something.
void ~ParticleManagerSettings()
dtor
ParticleManagerSettingsFlags
Flags for ParticleManagerSettings.
class ParticleManagerEvents g_ParticleManager
Has a fixed pool of precreated and reserved particles.
ParticleSource Create(int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0")
Legacy function for backwards compatibility.
array< ParticleSource > GetParticlesEx(int startIndex, int count)
Manually get a portion of the particles in the pool.
array< ParticleSource > CreateParticlesByIdArr(int id, notnull ParticlePropertiesArray properties, int count)
QoL function using script ParticleList, strongly recommend to read comments for CreateParticles as we...
proto native ParticleSource GetParticle(int index)
Manually get the particle at index.
void ~ParticleManager()
dtor
@ DISABLE_VIRTUAL
Disable the creation of virtual particles when the pool is still allocating.
ParticleManagerEvents GetEvents()
Get the events.
class ParticleManagerConstants ParticleManagerSettings(int poolSize, int flags=ParticleManagerSettingsFlags.NONE)
Settings given to ParticleManager on creation (in ctor)
proto native int GetVirtualCount()
Gets the amount of virtual particles.
int CreateParticlesById(int id, notnull ParticlePropertiesArray properties, int count)
QoL function using script ParticleList, strongly recommend to read comments for CreateParticles as we...
proto native int PlayParticles(out array< ParticleSource > particles, string path, notnull array< vector > positions, int count=1)
QoL function for when wanting to play a particle at a position right away.
ParticleSource PlayInWorld(int particle_id, vector global_pos)
Creates a particle emitter on the given position and activates it.
ParticleSource CreateParticleByPath(string path, notnull ParticleProperties properties)
Create a particle.
ParticleSource CreateParticleById(int id, ParticleProperties properties)
QoL function for when only one particle is needed using script ParticleList, strongly recommend to re...
Entity which has the particle instance as an ObjectComponent.
array< ParticleSource > PlayParticlesById(int id, array< vector > positions, int count)
QoL function using script ParticleList, strongly recommend to read comments for PlayParticles as well...
void OnAllocation(array< ParticleSource > allocatedParticles)
proto int GetCountID()
Gets the ID for the ParticleManager.
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
proto native int GetPlayingCount()
Gets the amount of playing particles.
Invokers for ParticleManager events.
proto native int CreateParticles(array< ParticleSource > particles, string path, notnull ParticlePropertiesArray properties, int count=1)
Creates an amount of particles with the properties given.
proto native int GetAllocatedCount()
Gets the amount of particles currently allocated.
ParticleSource 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.
proto native int GetParticles(out array< ParticleSource > outArray, int startIndex, int count)
Manually get a portion of the particles in the pool.
@ FIXED_INDEX
Particles will be locked to the index and not reused.
private proto Managed GetScriptEvents()
Get the events.
ParticleSource PlayParticleById(int id, array< vector > position)
QoL function for when only one particle is needed using script ParticleList, strongly recommend to re...
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Super root of all classes in Enforce script.
proto native bool IsFinishedAllocating()
Checks if the ParticleManager has allocated all slots in the pool.
proto native int GetPoolSize()
Gets the fixed maximum size of the pool.
proto string GetDebugNameNative()
Gets the debug name for the ParticleManager.
ScriptInvoker Class provide list of callbacks usage: