Simple trigger volume that activates a WaveSpawner sequence when the player enters. Supports optional reactivation after a cooldown and editor helpers for authoring spawn points.
More...
|
void | ResetTrigger () |
| Manually initiates a reset cycle (useful from editor buttons or scripts). If reactivateTrigger is true, the trigger becomes eligible again after the cooldown.
|
|
void | AddSpawnpoint () |
| Creates a new child WaveSpawnPoint and selects it in the hierarchy.
|
|
void | ShowHide (bool showHide) |
| Editor-only: toggles whether the trigger volume gizmo is drawn.
|
|
|
BoxCollider | TriggerZone [get, set] |
| The trigger volume that detects activation (auto-assigned on enable).
|
|
int | ActiveWave [get, set] |
| The current wave index being spawned (0-based).
|
|
bool | IsActivated [get, set] |
| Whether this trigger is currently active (sequence running or ready).
|
|
WaveSpawner | WaveSpawner [get, set] |
| The wave table configuration used when this trigger activates.
|
|
List< WaveSpawnPoint > | WaveSpawnPoints [get] |
| Optional spawn anchors used when this trigger activates (randomly chosen).
|
|
Simple trigger volume that activates a WaveSpawner sequence when the player enters. Supports optional reactivation after a cooldown and editor helpers for authoring spawn points.
◆ ActivateWhenReady()
IEnumerator MegaCrush.Spawner.WaveTrigger.ActivateWhenReady |
( |
| ) |
|
|
private |
◆ AddSpawnpoint()
void MegaCrush.Spawner.WaveTrigger.AddSpawnpoint |
( |
| ) |
|
Creates a new child WaveSpawnPoint and selects it in the hierarchy.
◆ GetSettings()
◆ Init()
void MegaCrush.Spawner.WaveTrigger.Init |
( |
float | _ | ) |
|
|
private |
◆ OnDisable()
void MegaCrush.Spawner.WaveTrigger.OnDisable |
( |
| ) |
|
|
private |
◆ OnDrawGizmos()
void MegaCrush.Spawner.WaveTrigger.OnDrawGizmos |
( |
| ) |
|
|
private |
Draws the trigger volume in the Scene view, with a distinct color when active.
◆ OnEnable()
void MegaCrush.Spawner.WaveTrigger.OnEnable |
( |
| ) |
|
|
private |
◆ OnTriggerEnter()
void MegaCrush.Spawner.WaveTrigger.OnTriggerEnter |
( |
Collider | other | ) |
|
|
private |
Activation when a qualifying object enters the trigger volume.
◆ ResetTrigger()
void MegaCrush.Spawner.WaveTrigger.ResetTrigger |
( |
| ) |
|
Manually initiates a reset cycle (useful from editor buttons or scripts). If reactivateTrigger
is true, the trigger becomes eligible again after the cooldown.
◆ ShowHide()
void MegaCrush.Spawner.WaveTrigger.ShowHide |
( |
bool | showHide | ) |
|
Editor-only: toggles whether the trigger volume gizmo is drawn.
- Parameters
-
showHide | True to show; false to hide. |
◆ Start()
void MegaCrush.Spawner.WaveTrigger.Start |
( |
| ) |
|
|
private |
◆ TimeToReset()
IEnumerator MegaCrush.Spawner.WaveTrigger.TimeToReset |
( |
| ) |
|
|
private |
Handles the reactivation cooldown (if enabled).
◆ activeWave
int MegaCrush.Spawner.WaveTrigger.activeWave = 0 |
|
private |
◆ initialized
bool MegaCrush.Spawner.WaveTrigger.initialized = false |
|
private |
◆ isActivated
bool MegaCrush.Spawner.WaveTrigger.isActivated = false |
|
private |
◆ playerTag
string MegaCrush.Spawner.WaveTrigger.playerTag = "Player" |
|
private |
◆ reactivateTime
float MegaCrush.Spawner.WaveTrigger.reactivateTime = 10f |
|
private |
◆ reactivateTrigger
bool MegaCrush.Spawner.WaveTrigger.reactivateTrigger = false |
|
private |
◆ settings
◆ showHideTrigger
bool MegaCrush.Spawner.WaveTrigger.showHideTrigger = false |
|
private |
◆ spawner
◆ startAutomatically
bool MegaCrush.Spawner.WaveTrigger.startAutomatically = false |
|
private |
◆ triggerZone
BoxCollider MegaCrush.Spawner.WaveTrigger.triggerZone |
|
private |
◆ waveSpawner
◆ waveSpawnPoints
List<WaveSpawnPoint> MegaCrush.Spawner.WaveTrigger.waveSpawnPoints = new() |
|
private |
◆ ActiveWave
int MegaCrush.Spawner.WaveTrigger.ActiveWave |
|
getset |
The current wave index being spawned (0-based).
◆ IsActivated
bool MegaCrush.Spawner.WaveTrigger.IsActivated |
|
getset |
Whether this trigger is currently active (sequence running or ready).
◆ TriggerZone
BoxCollider MegaCrush.Spawner.WaveTrigger.TriggerZone |
|
getset |
The trigger volume that detects activation (auto-assigned on enable).
◆ WaveSpawner
The wave table configuration used when this trigger activates.
◆ WaveSpawnPoints
Optional spawn anchors used when this trigger activates (randomly chosen).
◆ onWaveTriggerActivated
Action<WaveTrigger> MegaCrush.Spawner.WaveTrigger.onWaveTriggerActivated |
|
static |
Fired when this trigger activates. RuntimeSpawner listens to begin spawning.
◆ onWaveTriggerReset
Action<WaveTrigger> MegaCrush.Spawner.WaveTrigger.onWaveTriggerReset |
|
static |
Fired when this trigger resets after a cooldown (if reactivation is enabled).
The documentation for this class was generated from the following file:
- D:/projects/Asset Store Packages/com.pixelwizards.runtimespawner/Code/Runtime/Components/WaveTrigger.cs