You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
absg/Source/SpaceBattler/Public/WaveSubsystem.h

49 lines
954 B

// 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<UWave*> InWaves, int32 CurrWave);
UFUNCTION(BlueprintCallable)
int32 SpawnWave(float InVerticalSpacing, float InHorizontalOffset, int InNumRows);
protected:
void SpawnUnits();
UPROPERTY()
TArray<UWave*> Waves;
UPROPERTY(BlueprintReadOnly)
int32 CurrentWave;
UPROPERTY()
TArray<UUnitInfo*> SpawnQueue;
UPROPERTY(BlueprintReadWrite)
UPrimaryDataAsset* SelectedStage;
UPROPERTY()
AActor* SpawnPoint;
FTimerHandle SpawnTimerHandle;
int32 NumRows;
int32 LastSpawnIndex;
float VerticalSpacing;
float HorizontalOffset;
int32 CurrentColumn;
};