// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Wave.h" #include "Subsystems/GameInstanceSubsystem.h" #include "WaveSubsystem.generated.h" /** * */ UCLASS() class SPACEBATTLER_API UWaveSubsystem : public UGameInstanceSubsystem { GENERATED_BODY() public: UFUNCTION(BlueprintCallable) void Init(TArray InWaves, int32 CurrWave); UFUNCTION(BlueprintCallable) int32 SpawnWave(float InVerticalSpacing, float InHorizontalOffset, int InNumRows); protected: void SpawnUnits(); UPROPERTY(BlueprintReadWrite) TArray Waves; UPROPERTY(BlueprintReadOnly) int32 CurrentWave; UPROPERTY() TArray SpawnQueue; UPROPERTY(BlueprintReadWrite) UPrimaryDataAsset* SelectedStage; UPROPERTY() AActor* SpawnPoint; FTimerHandle SpawnTimerHandle; int32 NumRows; int32 LastSpawnIndex; float VerticalSpacing; float HorizontalOffset; int32 CurrentColumn; };