Add Base Item Class for Inventory

This commit is contained in:
Philip W 2023-10-12 14:11:59 +01:00
parent 280644da78
commit 9362f478aa
3 changed files with 49 additions and 1 deletions

View File

@ -10,7 +10,8 @@
"LoadingPhase": "Default",
"AdditionalDependencies": [
"Engine",
"AIModule"
"AIModule",
"CoreUObject"
]
}
],

View File

@ -0,0 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "BaseItem.h"

View File

@ -0,0 +1,42 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "BaseItem.generated.h"
USTRUCT()
struct FItemSize
{
GENERATED_BODY()
int x;
int y;
FItemSize(int _x, int _y)
{
x = _x;
y = _y;
}
FItemSize()
{
x = 1;
y = 1;
}
};
/**
*
*/
UCLASS()
class ENDLESSVENDETTA_API UBaseItem : public UObject
{
GENERATED_BODY()
public:
const FName ItemName;
const FText Description;
const FItemSize ItemSize = FItemSize(1, 1);
};