Структуры данных | |
class | ParticleManagerConstants |
Class simply to have easily modded constants. Подробнее... | |
class | ParticleManagerEvents |
Invokers for ParticleManager events. Подробнее... | |
Перечисления | |
enum | ParticleManagerSettingsFlags { NONE , FIXED_INDEX , BLOCKING , DISABLE_VIRTUAL , REUSE_OWNED } |
Flags for ParticleManagerSettings. Подробнее... | |
Функции | |
class ParticleManagerConstants | ParticleManagerSettings (int poolSize, int flags=ParticleManagerSettingsFlags.NONE) |
Settings given to ParticleManager on creation (in ctor) | |
void | ~ParticleManagerSettings () |
dtor | |
static ParticleManager | GetInstance () |
Access to the static ParticleManager. | |
static void | CleanupInstance () |
To clean it up properly before game closes. | |
void | ParticleManager (ParticleManagerSettings settings) |
Constructor (ctor) | |
void | ~ParticleManager () |
dtor | |
API for compatibility with Particle/ParticleSource create/play | |
Mimics the static Create and Play methods from Particle/ParticleSource | |
ParticleSource | CreateParticle (int id, vector pos, bool playOnCreation=false, Object parent=null, vector ori=vector.Zero, bool forceWorldRotation=false, Class owner=null) |
Create function. | |
ParticleSource | CreateParticleEx (int id, vector pos, int flags=ParticlePropertiesFlags.NONE, Object parent=null, vector ori=vector.Zero, Class owner=null) |
Master create function. | |
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. | |
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. | |
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. | |
ParticleSource | Create (int particle_id, vector global_pos, vector global_ori="0 0 0") |
Legacy function for backwards compatibility with 1.01 and below. | |
Static play on creation | |
You can use the following Play(...) functions to create and activate a particle in 1 line of your script. | |
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. | |
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 | PlayInWorld (int particle_id, vector global_pos) |
Creates a particle emitter on the given position and activates it. | |
ParticleSource | PlayInWorldEx (int particle_id, Object parent_obj, vector global_pos, vector global_ori="0 0 0", bool force_world_rotation=false) |
ParticleSource | Play (int particle_id, vector global_pos) |
Legacy function for backwards compatibility with 1.01 and below. | |
Get Particles | |
API for creating, playing or obtaining particles from the pool | |
proto native int | CreateParticles (array< ParticleSource > particles, string path, notnull ParticlePropertiesArray properties, int count=1) |
Creates an amount of particles with the properties given. | |
ParticleSource | CreateParticleByPath (string path, notnull ParticleProperties properties) |
Create a particle. | |
int | CreateParticlesById (int id, notnull ParticlePropertiesArray properties, int count) |
QoL function using script ParticleList, strongly recommend to read comments for CreateParticles as well. | |
array< ParticleSource > | CreateParticlesByIdArr (int id, notnull ParticlePropertiesArray properties, int count) |
QoL function using script ParticleList, strongly recommend to read comments for CreateParticles as well. | |
ParticleSource | CreateParticleById (int id, ParticleProperties properties) |
QoL function for when only one particle is needed using script ParticleList, strongly recommend to read comments for CreateParticles as well. | |
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. | |
array< ParticleSource > | PlayParticlesById (int id, array< vector > positions, int count) |
QoL function using script ParticleList, strongly recommend to read comments for PlayParticles as well. | |
ParticleSource | PlayParticleById (int id, array< vector > position) |
QoL function for when only one particle is needed using script ParticleList, strongly recommend to read comments for PlayParticles as well. | |
proto native ParticleSource | GetParticle (int index) |
Manually get the particle at index. | |
proto native int | GetParticles (out array< ParticleSource > outArray, int startIndex, int count) |
Manually get a portion of the particles in the pool. | |
array< ParticleSource > | GetParticlesEx (int startIndex, int count) |
Manually get a portion of the particles in the pool. | |
Identification | |
Identification functionality | |
proto native void | SetName (string name) |
Set a name for the ParticleManager to identify it more easily. | |
proto string | GetName () |
Gets the name which is set for the ParticleManager, default is "ParticleSourceManager". | |
proto string | GetDebugNameNative () |
Gets the debug name for the ParticleManager. | |
override string | GetDebugName () |
Gets the debug name for the ParticleManager. | |
proto int | GetCountID () |
Gets the ID for the ParticleManager. | |
proto static native int | GetStaticCount () |
Gets the amount of ParticleManager that have been created since the start of the program. | |
proto static native int | GetStaticActiveCount () |
Gets the amount of ParticleManager that are currently existing. | |
Properties and state | |
Obtain information about the state of the ParticleManager | |
proto native int | GetPoolSize () |
Gets the fixed maximum size of the pool. | |
proto native int | GetAllocatedCount () |
Gets the amount of particles currently allocated. | |
proto native int | GetVirtualCount () |
Gets the amount of virtual particles. | |
proto native int | GetPlayingCount () |
Gets the amount of playing particles. | |
proto native bool | IsFinishedAllocating () |
Checks if the ParticleManager has allocated all slots in the pool. | |
Script Events API | |
Setting and getting of ScriptEvents | |
proto void | SetScriptEvents (Managed events) |
Set the events. | |
proto Managed | GetScriptEvents () |
Get the events. | |
ParticleManagerEvents | GetEvents () |
Get the events. | |
Events | |
Events called from C++ | |
void | OnAllocation (array< ParticleSource > allocatedParticles) |
void | OnAllocationEnd () |
Переменные | |
class ParticleManagerEvents | g_ParticleManager |
Has a fixed pool of precreated and reserved particles. | |
Global ParticleManager settings | |
Settings applied to the global ParticleManager | |
static const int | POOL_SIZE = 10000 |
static const int | FLAGS = ParticleManagerSettingsFlags.NONE |