A class meant to be used in conjunction with an object pool (simple or multiple) to spawn objects regularly, at a frequency randomly chosen between the min and max values set in its inspector
More...
|
virtual void | Start () |
| On Start we initialize our spawner More...
|
|
virtual void | Initialization () |
| Grabs the associated object pooler if there's one, and initalizes the frequency More...
|
|
virtual void | Update () |
| Every frame we check whether or not we should spawn something More...
|
|
virtual void | Spawn () |
| Spawns an object out of the pool if there's one available. If it's an object with Health, revives it too. More...
|
|
virtual void | DetermineNextFrequency () |
| Determines the next frequency by randomizing a value between the two specified in the inspector. More...
|
|
A class meant to be used in conjunction with an object pool (simple or multiple) to spawn objects regularly, at a frequency randomly chosen between the min and max values set in its inspector
◆ DetermineNextFrequency()
virtual void MoreMountains.CorgiEngine.TimedSpawner.DetermineNextFrequency |
( |
| ) |
|
|
protectedvirtual |
Determines the next frequency by randomizing a value between the two specified in the inspector.
◆ Initialization()
virtual void MoreMountains.CorgiEngine.TimedSpawner.Initialization |
( |
| ) |
|
|
protectedvirtual |
Grabs the associated object pooler if there's one, and initalizes the frequency
◆ Spawn()
virtual void MoreMountains.CorgiEngine.TimedSpawner.Spawn |
( |
| ) |
|
|
protectedvirtual |
Spawns an object out of the pool if there's one available. If it's an object with Health, revives it too.
◆ Start()
virtual void MoreMountains.CorgiEngine.TimedSpawner.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we initialize our spawner
◆ Update()
virtual void MoreMountains.CorgiEngine.TimedSpawner.Update |
( |
| ) |
|
|
protectedvirtual |
Every frame we check whether or not we should spawn something
◆ _lastSpawnTimestamp
float MoreMountains.CorgiEngine.TimedSpawner._lastSpawnTimestamp = 0f |
|
protected |
◆ _nextFrequency
float MoreMountains.CorgiEngine.TimedSpawner._nextFrequency = 0f |
|
protected |
◆ MaxFrequency
float MoreMountains.CorgiEngine.TimedSpawner.MaxFrequency = 1f |
the maximum frequency possible, in seconds
◆ MinFrequency
float MoreMountains.CorgiEngine.TimedSpawner.MinFrequency = 1f |
the minimum frequency possible, in seconds
◆ ObjectPooler
the object pooler associated to this spawner
The documentation for this class was generated from the following file: