RealtimeStyleTransferRuntime/Source/LyraGame/Equipment/LyraEquipmentDefinition.h

58 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "GameplayTagContainer.h"
#include "LyraEquipmentDefinition.generated.h"
class ULyraAbilitySet;
class ULyraEquipmentInstance;
USTRUCT()
struct FLyraEquipmentActorToSpawn
{
GENERATED_BODY()
FLyraEquipmentActorToSpawn()
{}
UPROPERTY(EditAnywhere, Category=Equipment)
TSubclassOf<AActor> ActorToSpawn;
UPROPERTY(EditAnywhere, Category=Equipment)
FName AttachSocket;
UPROPERTY(EditAnywhere, Category=Equipment)
FTransform AttachTransform;
};
/**
* ULyraEquipmentDefinition
*
* Definition of a piece of equipment that can be applied to a pawn
*/
UCLASS(Blueprintable, Const, Abstract, BlueprintType)
class ULyraEquipmentDefinition : public UObject
{
GENERATED_BODY()
public:
ULyraEquipmentDefinition(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
// Class to spawn
UPROPERTY(EditDefaultsOnly, Category=Equipment)
TSubclassOf<ULyraEquipmentInstance> InstanceType;
// Gameplay ability sets to grant when this is equipped
UPROPERTY(EditDefaultsOnly, Category=Equipment)
TArray<TObjectPtr<const ULyraAbilitySet>> AbilitySetsToGrant;
// Actors to spawn on the pawn when this is equipped
UPROPERTY(EditDefaultsOnly, Category=Equipment)
TArray<FLyraEquipmentActorToSpawn> ActorsToSpawn;
};