Drives spawn system intensity over time or via explicit steps. Applies values from an IntensityProfile to a bound RuntimeSpawner (population caps, spawn rates, etc.).
More...
|
void | Init (RuntimeSpawner spawner) |
| Binds the director to a spawner. Called by RuntimeSpawner.Init.
|
|
void | Begin () |
| Applies the starting step and, if configured, begins auto-advancing. Called by RuntimeSpawner.StartSpawners.
|
|
void | Stop () |
| Stops any auto-advance coroutine. Manual step control remains available.
|
|
void | StepUp (int delta=1) |
| Increases the current step by delta (clamped to valid range).
|
|
void | StepDown (int delta=1) |
| Decreases the current step by delta (clamped to valid range).
|
|
void | SetStep (int index) |
| Sets the current step to index (clamped to valid range).
|
|
|
IntensityProfile | Profile [get, set] |
| The profile that defines intensity steps and advance mode.
|
|
int | CurrentStep [get] |
| The currently applied step index (0-based).
|
|
int | MaxStep [get] |
| Maximum valid step index (0-based), or 0 if the profile is empty.
|
|
int | StepsCount [get] |
| Number of steps defined by the profile, or 0 if none.
|
|
|
Action< int > | OnStepChanged |
| Raised whenever the active step changes. Payload is the new step index.
|
|
|
IEnumerator | AutoAdvance () |
| Automatically advances steps over time when the profile is configured for timed advance.
|
|
void | ApplyStep (int idx) |
| Applies a profile step and updates the bound spawner's tuning values.
|
|
Drives spawn system intensity over time or via explicit steps. Applies values from an IntensityProfile to a bound RuntimeSpawner (population caps, spawn rates, etc.).
◆ ApplyStep()
void MegaCrush.Spawner.SpawnDirector.ApplyStep |
( |
int | idx | ) |
|
|
private |
Applies a profile step and updates the bound spawner's tuning values.
- Parameters
-
idx | Step index to apply (assumed clamped). |
◆ AutoAdvance()
IEnumerator MegaCrush.Spawner.SpawnDirector.AutoAdvance |
( |
| ) |
|
|
private |
Automatically advances steps over time when the profile is configured for timed advance.
◆ Begin()
void MegaCrush.Spawner.SpawnDirector.Begin |
( |
| ) |
|
Applies the starting step and, if configured, begins auto-advancing. Called by RuntimeSpawner.StartSpawners.
◆ Init()
Binds the director to a spawner. Called by RuntimeSpawner.Init.
- Parameters
-
spawner | Spawner to control. |
◆ SetStep()
void MegaCrush.Spawner.SpawnDirector.SetStep |
( |
int | index | ) |
|
Sets the current step to index (clamped to valid range).
◆ StepDown()
void MegaCrush.Spawner.SpawnDirector.StepDown |
( |
int | delta = 1 | ) |
|
Decreases the current step by delta (clamped to valid range).
◆ StepUp()
void MegaCrush.Spawner.SpawnDirector.StepUp |
( |
int | delta = 1 | ) |
|
Increases the current step by delta (clamped to valid range).
◆ Stop()
void MegaCrush.Spawner.SpawnDirector.Stop |
( |
| ) |
|
Stops any auto-advance coroutine. Manual step control remains available.
◆ _autoCoro
Coroutine MegaCrush.Spawner.SpawnDirector._autoCoro |
|
private |
◆ _currentStep
int MegaCrush.Spawner.SpawnDirector._currentStep |
|
private |
◆ _spawner
◆ profile
◆ startStep
int MegaCrush.Spawner.SpawnDirector.startStep = 0 |
|
private |
◆ CurrentStep
int MegaCrush.Spawner.SpawnDirector.CurrentStep |
|
get |
The currently applied step index (0-based).
◆ MaxStep
int MegaCrush.Spawner.SpawnDirector.MaxStep |
|
get |
Maximum valid step index (0-based), or 0 if the profile is empty.
◆ Profile
The profile that defines intensity steps and advance mode.
◆ StepsCount
int MegaCrush.Spawner.SpawnDirector.StepsCount |
|
get |
Number of steps defined by the profile, or 0 if none.
◆ OnStepChanged
Action<int> MegaCrush.Spawner.SpawnDirector.OnStepChanged |
Raised whenever the active step changes. Payload is the new step index.
The documentation for this class was generated from the following file:
- D:/projects/Asset Store Packages/com.pixelwizards.runtimespawner/Code/Runtime/Components/SpawnDirector.cs