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/PartySubsystem.h

59 lines
1.3 KiB

// 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<UPartyMember*> GetMembersInTier(const int32 Tier);
protected:
void SpawnUnits();
UPROPERTY(BlueprintReadWrite, EditAnywhere)
TArray<TObjectPtr<UPartyMember>> PartyMembers;
UPROPERTY()
TArray<TSubclassOf<AActor>> 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;
};