Hydrogen Framework
1.3.1
|
A drop in implementation of the Hydrogen.Core.ObjectPoolItem. This is one possible way of setting up an ObjectPoolItem to handle spawning and despawning appropriately. More...
Public Member Functions | |
override void | DespawnSafely () |
Despawn the gameObject safely after all particles have done their thing. More... | |
override bool | IsInactive () |
Is the object idle, and therefore can be despawned organically? More... | |
override void | OnDespawned () |
Raised when the object is 'despawned' back into the pool. More... | |
override void | OnSpawned () |
Raised when the object is 'spawned' from the pool. More... | |
Public Attributes | |
float | LifeTime |
Despawn gameObject after this number of seconds. More... | |
A drop in implementation of the Hydrogen.Core.ObjectPoolItem. This is one possible way of setting up an ObjectPoolItem to handle spawning and despawning appropriately.
Learn from it, make your own, as long as you extend from the base class you still get the performance benefits.
Definition at line 41 of file hObjectPoolItem.cs.
|
virtual |
Despawn the gameObject safely after all particles have done their thing.
If you are going to utilize this make sure that your function contains: hObjectPool.Instance.objectPools[poolID].DespawnImmediate(gameObject);
Implements Hydrogen.Core.ObjectPoolItemBase.
Definition at line 54 of file hObjectPoolItem.cs.
|
virtual |
Is the object idle, and therefore can be despawned organically?
false
This will only work on tracked spawned objects.
Implements Hydrogen.Core.ObjectPoolItemBase.
Definition at line 65 of file hObjectPoolItem.cs.
|
virtual |
Raised when the object is 'despawned' back into the pool.
It does not set "active", you must handle that yourself.
Implements Hydrogen.Core.ObjectPoolItemBase.
Definition at line 75 of file hObjectPoolItem.cs.
|
virtual |
Raised when the object is 'spawned' from the pool.
It does not set "active", you must handle that yourself.
Implements Hydrogen.Core.ObjectPoolItemBase.
Definition at line 89 of file hObjectPoolItem.cs.
float hObjectPoolItem.LifeTime |
Despawn gameObject after this number of seconds.
In seconds, use 0 to disable.
Definition at line 47 of file hObjectPoolItem.cs.