40 UFUNCTION(BlueprintCallable, Category =
"Wave")
44 UFUNCTION(BlueprintCallable, Category =
"Wave")
45 void RegisterSpawnPoints(
const TArray<AActor*>& InSpawnPoints);
47 UFUNCTION(BlueprintPure, Category =
"Wave")
48 int32 GetCurrentWaveIndex()
const {
return CurrentWaveIndex; }
50 UFUNCTION(BlueprintPure, Category =
"Wave")
51 int32 GetAliveEnemyCount()
const {
return AliveEnemyCount; }
53 UFUNCTION(BlueprintPure, Category =
"Wave")
54 int32 GetTotalWaveCount() const;
57 void BeginWave(int32 WaveIndex);
58 void BuildSpawnQueue(const struct
FWaveData& Wave);
59 void ProcessSpawnQueue();
60 void CheckWaveClearCondition();
61 void AdvanceToNextWave();
62 FVector GetSpawnLocation() const;
68 void OnWaveDelayFinished();
71 int32 CurrentWaveIndex = -1;
72 int32 AliveEnemyCount = 0;
73 int32 EffectiveMaxAlive = 0;
74 int32 SpawnQueueIndex = 0;
75 bool bSpawnQueueDone = false;
76 bool bCurrentWaveWaitsForClear = true;
80 UPROPERTY(BlueprintAssignable, Category = "Wave")
81 FOnWaveStarted OnWaveStarted;
83 UPROPERTY(BlueprintAssignable, Category = "Wave")
84 FOnWaveCleared OnWaveCleared;
86 UPROPERTY(BlueprintAssignable, Category = "Wave")
87 FOnAllWavesCleared OnAllWavesCleared;
96 TArray<TWeakObjectPtr<AActor>> SpawnPoints;
98 FTimerHandle WaveDelayTimer;
99 FTimerHandle SpawnTimer;