Update Base Item for BP Properties

This commit is contained in:
Philip W 2023-10-13 20:10:51 +01:00
parent 55e9321288
commit 17ecf7a3e6
3 changed files with 41 additions and 17 deletions

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

Binary file not shown.

View File

@ -6,37 +6,55 @@
#include "UObject/NoExportTypes.h"
#include "BaseItem.generated.h"
USTRUCT()
struct FItemSize
USTRUCT(BlueprintType)
struct FItemSize
{
GENERATED_BODY()
int x;
int y;
int X;
int Y;
FItemSize(int _x, int _y)
FItemSize(const int _X, const int _Y)
{
x = _x;
y = _y;
X = _X;
Y = _Y;
}
FItemSize()
{
x = 1;
y = 1;
X = 1;
Y = 1;
}
};
UENUM(BlueprintType)
enum EItemRotation
{
Horizontal UMETA(DisplayName = "Up"),
Vertical UMETA(DisplayName = "Down")
};
/**
*
*/
UCLASS()
UCLASS(Abstract)
class ENDLESSVENDETTA_API UBaseItem : public UObject
{
GENERATED_BODY()
public:
const FName ItemName;
const FText Description;
const FItemSize ItemSize = FItemSize(1, 1);
public:
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
int ItemID;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
FName ItemName;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
FText Description;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
FItemSize ItemSize = FItemSize();
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Instanced, Category = "Item")
TArray<UTexture2D*> ItemTextures;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
TEnumAsByte<EItemRotation> CurrentItemRotation = Horizontal;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
TSubclassOf<AActor> ItemActor;
};