DRG-Femboy-Voice/Source/FSD/Public/EnemyWaveManager.h
2025-04-15 12:39:31 -07:00

100 lines
3.3 KiB
C++
Executable file

#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "RandRange.h"
#include "Templates/SubclassOf.h"
#include "WaveEntry.h"
#include "EnemyWaveManager.generated.h"
class AFSDGameMode;
class APawn;
class UEnemySpawnManager;
class UEnemyWaveController;
class UObject;
UCLASS(Blueprintable, ClassGroup=Custom, meta=(BlueprintSpawnableComponent))
class UEnemyWaveManager : public UActorComponent {
GENERATED_BODY()
public:
protected:
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
TSoftClassPtr<UEnemyWaveController> AlwaysRunningWave;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
TArray<FWaveEntry> ScriptedWaves;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
TArray<FWaveEntry> EndMissionWaves;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
TArray<UEnemyWaveController*> ActiveScriptedWaves;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float StartDelay;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float spawnRadiusFromSpawnPoint;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
bool ScriptedWavesEnabled;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
bool NormalWavesEnabled;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
bool OverrideDifficultyScriptedWaveInternal;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
FRandRange OverrideScriptedWaveInterval;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
AFSDGameMode* GameMode;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, Transient, meta=(AllowPrivateAccess=true))
UEnemySpawnManager* SpawnManager;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
TArray<UObject*> NormalWavesBlockStack;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
TArray<UObject*> ScriptedWavesBlockStack;
public:
UEnemyWaveManager();
UFUNCTION(BlueprintCallable)
UEnemyWaveController* TriggerWave(TSubclassOf<UEnemyWaveController> waveClass);
UFUNCTION(BlueprintCallable)
void TriggerEndWave(bool cancelAllWaves);
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable)
void SpawnScriptedWave();
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable)
void PushDisableScriptedWaves(UObject* Owner);
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable)
void PushDisableNormalWaves(UObject* Owner);
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable)
void PopDisableScriptedWaves(UObject* Owner);
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable)
void PopDisableNormalWaves(UObject* Owner);
protected:
UFUNCTION(BlueprintCallable)
void OnMatchEnded();
UFUNCTION(BlueprintCallable)
void OnEnemySpawned(APawn* enemy);
public:
UFUNCTION(BlueprintCallable, BlueprintPure)
bool AreScriptedWavesBlocked() const;
UFUNCTION(BlueprintCallable, BlueprintPure)
bool AreNormalWavesBlocked() const;
};