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.TopDownEngine.TimedSpawner.DetermineNextFrequency |
( |
| ) |
|
|
protectedvirtual |
Determines the next frequency by randomizing a value between the two specified in the inspector.
◆ Initialization()
virtual void MoreMountains.TopDownEngine.TimedSpawner.Initialization |
( |
| ) |
|
|
protectedvirtual |
Grabs the associated object pooler if there's one, and initalizes the frequency
◆ Spawn()
virtual void MoreMountains.TopDownEngine.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.TopDownEngine.TimedSpawner.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we initialize our spawner
◆ ToggleSpawn()
virtual void MoreMountains.TopDownEngine.TimedSpawner.ToggleSpawn |
( |
| ) |
|
|
virtual |
◆ TurnSpawnOff()
virtual void MoreMountains.TopDownEngine.TimedSpawner.TurnSpawnOff |
( |
| ) |
|
|
virtual |
◆ TurnSpawnOn()
virtual void MoreMountains.TopDownEngine.TimedSpawner.TurnSpawnOn |
( |
| ) |
|
|
virtual |
◆ Update()
virtual void MoreMountains.TopDownEngine.TimedSpawner.Update |
( |
| ) |
|
|
protectedvirtual |
Every frame we check whether or not we should spawn something
◆ _lastSpawnTimestamp
float MoreMountains.TopDownEngine.TimedSpawner._lastSpawnTimestamp = 0f |
|
protected |
◆ _nextFrequency
float MoreMountains.TopDownEngine.TimedSpawner._nextFrequency = 0f |
|
protected |
◆ CanSpawn
bool MoreMountains.TopDownEngine.TimedSpawner.CanSpawn = true |
whether or not this spawner can spawn
◆ CanSpawnButton
bool MoreMountains.TopDownEngine.TimedSpawner.CanSpawnButton |
a test button to spawn an object
◆ MaxFrequency
float MoreMountains.TopDownEngine.TimedSpawner.MaxFrequency = 1f |
the maximum frequency possible, in seconds
◆ MinFrequency
float MoreMountains.TopDownEngine.TimedSpawner.MinFrequency = 1f |
the minimum frequency possible, in seconds
◆ ObjectPooler
virtual MMObjectPooler MoreMountains.TopDownEngine.TimedSpawner.ObjectPooler |
|
getset |
the object pooler associated to this spawner
The documentation for this class was generated from the following file:
- E:/Github/Store/TopDownEngine/Assets/TopDownEngine/Common/Scripts/Characters/AI/Automation/TimedSpawner.cs