106 virtual void Deinitialize()
override;
107 virtual void OnLevelLoaded(ULevel* NewLevel,
const ULevelStreamingData* LevelStreamingData)
override;
108 virtual void OnLevelUnloaded()
override;
112 void SetCurrentWaveRemainingEnemyCount(int32 Count);
113 void IncreaseCurrentWaveRemainingEnemyCount(int32 Count);
114 void DecreaseCurrentWaveRemainingEnemyCount(int32 Count = 1);
117 void NotifyNextWaveCountdownStarted(
float Duration);
118 void NotifyNextWaveCountdownStopped();
124 UFUNCTION(BlueprintCallable, Category =
"StageEvent", meta = (AutoCreateRefTerm =
"ListeningTags,ListenerContext"))
125 FGuid RegisterListener
128 const TArray<FName>& ListeningEventIDs,
129 const FGameplayTagContainer& ListeningTags,
131 const FInstancedStruct& ListenerContext = FInstancedStruct()
134 UFUNCTION(BlueprintCallable, Category = "StageEvent")
135 void UnregisterListener(FGuid SubscriptionHandle);
137 UFUNCTION(BlueprintCallable, Category = "StageEvent")
140 UFUNCTION(BlueprintCallable, Category = "StageEvent")
141 void DispatchStageEvent(const
FStageEventMessage& Message, const AActor* Caller =
nullptr);
148 void NotifyProcessorTriggered(const FName EventID, const AActor* Caller, const
UStageEventProcessor* Processor);
150 FName GetLastPlayerTriggeredEventID() const;
151 bool RollbackLastPlayerTriggeredProcessorCounts(const FName EventID);
155 UFUNCTION(BlueprintPure, Category = "Stage")
156 int32 CurrentWaveIndex() const;
159 UFUNCTION(BlueprintPure, Category = "Stage")
160 FName GetWaveID() const;
162 UFUNCTION(BlueprintPure, Category = "Stage|Enemy")
163 int32 GetTotalSpawnRemainingCount() const;
165 UFUNCTION(BlueprintPure, Category = "Stage|Enemy")
166 int32 GetCurrentWaveRemainingEnemyCount() const;
168 UFUNCTION(BlueprintPure, Category = "Stage|Enemy")
169 int32 GetSpawnedEnemyCount() const;
171 UFUNCTION(BlueprintCallable, Category = "Stage|Enemy")
172 void NotifyEnemyRemainingCountChanged();
174 UFUNCTION(BlueprintPure, Category = "Stage|Wave")
175 float GetNextWaveCountdownRemainingTime() const;
177 UFUNCTION(BlueprintPure, Category = "Stage|Wave")
178 bool IsNextWaveCountdownActive() const;
181 UFUNCTION(BlueprintCallable, Category = "StageEvent")
184 UFUNCTION(BlueprintCallable, Category = "StageEvent")
185 void ResetAllProcessorTriggerCounts();
188 UFUNCTION(BlueprintPure, Category = "Stage")
194 UFUNCTION(BlueprintPure, Category =
"Stage")
195 FORCEINLINE FName GetCurrentStageID()
const
197 return StageProgress.GetCurrentStageID();
201 template <CSpawnSystem TSpawnSystem>
202 TSpawnSystem* GetOrCreateSpawnSystem();
205 bool EnsureStageDictionaryLoaded();
208 bool IsPlayerEventCaller(
const AActor* Caller)
const;
209 void NotifyStageEventListeners(
const FStageEventMessage& Event,
const TArray<FStageEventSubscription>& Subscriptions);
213 UPROPERTY(BlueprintAssignable, Category =
"Wave")
214 FOnWaveManagerReadyToSpawning ReadyToSpawn;
216 UPROPERTY(BlueprintAssignable, Category = "Wave")
217 FOnWaveStarted OnWaveStarted;
219 UPROPERTY(BlueprintAssignable, Category = "Wave")
220 FOnWaveCleared OnWaveCleared;
222 UPROPERTY(BlueprintAssignable, Category = "Enemy")
223 FOnSpawnedEnemyKilled OnSpawnedEnemyKilled;
225 UPROPERTY(BlueprintAssignable, Category = "Enemy")
226 FOnEnemyRemainingCountChanged OnEnemyRemainingCountChanged;
247 FName LastPlayerTriggeredEventID = NAME_None;
248 int32 PlayerTriggeredDispatchSerial = 0;
249 int32 ActivePlayerTriggeredDispatchSerial = INDEX_NONE;
250 int32 LastPlayerTriggeredDispatchSerial = INDEX_NONE;
253 friend struct FStageManagementHandle;
Definition StoryboardDefinition.h:36
Definition StageEventContext.h:15
Definition StoryboardDefinition.h:17