#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 AlwaysRunningWave; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) TArray ScriptedWaves; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) TArray EndMissionWaves; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) TArray 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 NormalWavesBlockStack; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) TArray ScriptedWavesBlockStack; public: UEnemyWaveManager(); UFUNCTION(BlueprintCallable) UEnemyWaveController* TriggerWave(TSubclassOf 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; };