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.
45 lines
971 B
45 lines
971 B
12 months ago
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include "CoreMinimal.h"
|
||
|
#include "UnitInfo.h"
|
||
|
#include "Subsystems/LocalPlayerSubsystem.h"
|
||
|
#include "PartySubsystem.generated.h"
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
UCLASS()
|
||
|
class SPACEBATTLER_API UPartySubsystem : public ULocalPlayerSubsystem
|
||
|
{
|
||
|
GENERATED_BODY()
|
||
|
public:
|
||
|
UFUNCTION(BlueprintCallable)
|
||
|
int32 SpawnParty(float VerticalSpacing, float HorizontalOffset, int NumRows);
|
||
|
|
||
|
UFUNCTION(BlueprintCallable)
|
||
|
void AddToParty(UUnitInfo* UnitInfo);
|
||
|
|
||
|
UFUNCTION(BlueprintCallable)
|
||
|
TMap<UUnitInfo*, int32> GetMembers();
|
||
|
|
||
|
protected:
|
||
|
void SpawnUnits();
|
||
|
|
||
|
UPROPERTY()
|
||
|
TArray<TSubclassOf<AActor>> SpawnQueue;
|
||
|
|
||
|
UPROPERTY(BlueprintReadWrite, EditAnywhere)
|
||
|
TMap<UUnitInfo*, int32> Members;
|
||
|
|
||
|
UPROPERTY(BlueprintReadWrite, EditAnywhere)
|
||
|
UPrimaryDataAsset* SelectedGeneral;
|
||
|
|
||
|
FTimerHandle SpawnTimerHandle;
|
||
|
int32 LastSpawnIndex;
|
||
|
int32 NumRows;
|
||
|
float HorizontalOffset;
|
||
|
float VerticalSpacing;
|
||
|
};
|