|
Runtime Spawner 1.5.1
Generic Runtime spawn and instance pooling system for spawning random AI agents around a map. Works with ANY AI system easily.
|
Periodic loop that maintains the Global population between configured bounds. Respects: More...
Public Member Functions | |
| GlobalSpawnLoop (RuntimeSpawner owner, ISpawnExecutor exec, PopulationTracker pop) | |
| IEnumerator | Run (List< SpawnEntry > globalSpawners, int minGlobalCount, int maxGlobalCount, int maxOverallPopulation) |
| Runs the global spawn loop. | |
Private Member Functions | |
| void | BuildEligibleEntries (List< SpawnEntry > globalSpawners) |
| Filters entries into _eligibleEntries based on per-entry maxPopulation. Uses SpawnEntry.currentPopulation, which should be maintained by the executor. | |
Private Attributes | |
| readonly RuntimeSpawner | _owner |
| readonly ISpawnExecutor | _exec |
| readonly PopulationTracker | _pop |
| readonly List< SpawnEntry > | _eligibleEntries = new(64) |
Periodic loop that maintains the Global population between configured bounds. Respects:
| MegaCrush.Spawner.GlobalSpawnLoop.GlobalSpawnLoop | ( | RuntimeSpawner | owner, |
| ISpawnExecutor | exec, | ||
| PopulationTracker | pop ) |
|
private |
Filters entries into _eligibleEntries based on per-entry maxPopulation. Uses SpawnEntry.currentPopulation, which should be maintained by the executor.
| IEnumerator MegaCrush.Spawner.GlobalSpawnLoop.Run | ( | List< SpawnEntry > | globalSpawners, |
| int | minGlobalCount, | ||
| int | maxGlobalCount, | ||
| int | maxOverallPopulation ) |
Runs the global spawn loop.
| globalSpawners | Spawn entries that are allowed to spawn globally. |
| minGlobalCount | Desired minimum number of Global-sourced objects. |
| maxGlobalCount | Desired maximum number of Global-sourced objects. |
| maxOverallPopulation | Hard overall cap across all SpawnSources (Global + Region + Wave + Special, etc.). |
|
private |
|
private |
|
private |
|
private |