// 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 GetMembers(); protected: void SpawnUnits(); UPROPERTY() TArray> SpawnQueue; UPROPERTY(BlueprintReadWrite, EditAnywhere) TMap Members; UPROPERTY(BlueprintReadWrite, EditAnywhere) UPrimaryDataAsset* SelectedGeneral; FTimerHandle SpawnTimerHandle; int32 LastSpawnIndex; int32 NumRows; float HorizontalOffset; float VerticalSpacing; };