![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Public Attributes | |
int | maxAlive |
How many enemies can be alive at any one time. More... | |
![]() | |
bool | autoSpawn = true |
If true we spawn automatically. If false we wait until something calls us. More... | |
int | spawnAmount |
How many objects to spawn, use -1 for infinite. More... | |
float | spawnRate |
How fast should we spawn. More... | |
bool | delayOnFirstInstance |
If true the first instance will be delayed by the spawn rate, else it will spawn instantly. More... | |
![]() | |
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 | |
override void | Init () |
Initialise pool. More... | |
override void | Reset (GameObject instance) |
Reset the specified instance. Specific implementations should override this. More... | |
override IEnumerator | Spawn () |
Coroutine that spawns enemies. More... | |
virtual bool | CheckAliveCount () |
Check we don't have too many enemies alive and thus can't spawn. More... | |
![]() | |
override void | Init () |
Initialise pool. More... | |
virtual void | DoSpawn () |
Do the spawning. More... | |
![]() | |
virtual void | PopulatePool () |
Initialise the pool. More... | |
virtual GameObject | CreateInstance () |
Creates a new instance. More... | |
Protected Attributes | |
int | defaultHealth |
The default health to restore when resetting More... | |
bool | defaultCanCharacterFall |
The default can cahracter fall setting to restore. here because often death movements change this. More... | |
![]() | |
int | spawnsRemaining |
How many spwns remain. More... | |
![]() | |
int | currentPosition |
Current position in pool. More... | |
Additional Inherited Members | |
![]() | |
virtual void | SpawnNow () |
If this is not an auto spawner start spawning. More... | |
![]() | |
void | Start () |
Unity Start hook. More... | |
virtual GameObject | GetInstance () |
Gets an instance form the pool, or null if no instances available. More... | |
|
protectedvirtual |
Check we don't have too many enemies alive and thus can't spawn.
true
, if alive count was checked, false
otherwise.
|
protectedvirtual |
Initialise pool.
Reimplemented from PlatformerPro.Pool.
|
protectedvirtual |
Reset the specified instance. Specific implementations should override this.
instance | Instance. |
Reimplemented from PlatformerPro.Pool.
|
protectedvirtual |
Coroutine that spawns enemies.
Reimplemented from PlatformerPro.Spawner.
|
protected |
The default can cahracter fall setting to restore. here because often death movements change this.
|
protected |
The default health to restore when resetting
int PlatformerPro.EnemySpawner.maxAlive |
How many enemies can be alive at any one time.