d
d
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "InventorySystem.generated.h"
USTRUCT(BlueprintType)
struct FInventoryItem {
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FName ItemName;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 Quantity;
UCLASS()
class MYGAME_API AInventorySystem : public AActor
{
GENERATED_BODY()
public:
AInventorySystem();
UFUNCTION(BlueprintCallable, Category="Inventory")
void AddItem(FName ItemName, int32 Quantity);
UFUNCTION(BlueprintCallable, Category="Inventory")
bool RemoveItem(FName ItemName, int32 Quantity);
};
AInventorySystem::AInventorySystem() {}