![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
A simple pool of objects. More...
Public Member Functions | |
void | Start () |
Unity Start hook. More... | |
virtual GameObject | GetInstance () |
Gets an instance form the pool, or null if no instances available. More... | |
Public Attributes | |
List< GameObject > | pooledObjects |
The pooled objects. You can assign the pool here, this can be useful if you don't want all objects to be the same. More... | |
GameObject | poolPrefab |
Prefab to use to create new pool objects. More... | |
int | startingSize |
Starting size of pool. More... | |
bool | createMoreIfExhausted |
Should we create more objects if pool is exhausted or should we throw an error. More... | |
Protected Member Functions | |
virtual void | Init () |
Initialise pool. More... | |
virtual void | PopulatePool () |
Initialise the pool. More... | |
virtual GameObject | CreateInstance () |
Creates a new instance. More... | |
virtual void | Reset (GameObject instance) |
Reset the specified instance. Specific implementations should override this. More... | |
Protected Attributes | |
int | currentPosition |
Current position in pool. More... | |
A simple pool of objects.
|
protectedvirtual |
Creates a new instance.
|
virtual |
Gets an instance form the pool, or null if no instances available.
|
protectedvirtual |
Initialise pool.
Reimplemented in PlatformerPro.Spawner, and PlatformerPro.EnemySpawner.
|
protectedvirtual |
Initialise the pool.
|
protectedvirtual |
Reset the specified instance. Specific implementations should override this.
instance | Instance. |
Reimplemented in PlatformerPro.EnemySpawner.
void PlatformerPro.Pool.Start | ( | ) |
Unity Start hook.
bool PlatformerPro.Pool.createMoreIfExhausted |
Should we create more objects if pool is exhausted or should we throw an error.
|
protected |
Current position in pool.
List<GameObject> PlatformerPro.Pool.pooledObjects |
The pooled objects. You can assign the pool here, this can be useful if you don't want all objects to be the same.
GameObject PlatformerPro.Pool.poolPrefab |
Prefab to use to create new pool objects.
int PlatformerPro.Pool.startingSize |
Starting size of pool.