// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "PartyMember.h" #include "Subsystems/LocalPlayerSubsystem.h" #include "PartySubsystem.generated.h" /** * */ UCLASS(meta=(ShowWorldContextPin)) class SPACEBATTLER_API UPartySubsystem : public UGameInstanceSubsystem { GENERATED_BODY() public: UFUNCTION(BlueprintCallable) int32 SpawnParty(const float InVerticalSpacing, const float InHorizontalOffset, const float InHorizontalSpacing, const int InNumRows); UFUNCTION(BlueprintCallable) void SetCredits(int32 Amount); UFUNCTION(BlueprintCallable) int32 GetTotalAvailablePartyMembers(); UFUNCTION(BlueprintCallable) int32 GetTotalAllocatedPartyMembers(); UFUNCTION(BlueprintCallable) TArray GetMembersInTier(const int32 Tier); protected: void SpawnUnits(); UPROPERTY(BlueprintReadWrite, EditAnywhere) TArray> PartyMembers; UPROPERTY() TArray> SpawnQueue; UPROPERTY(BlueprintReadWrite, EditAnywhere) UPrimaryDataAsset* SelectedGeneral; UPROPERTY(BlueprintReadWrite, EditAnywhere) int32 Credits; UPROPERTY() AActor* SpawnPoint; FTimerHandle SpawnTimerHandle; int32 LastSpawnIndex; int32 NumRows; int32 CurrentColumn; float HorizontalOffset; float VerticalSpacing; float HorizontalSpacing; };