AzureAbyss/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h
MH261677 a40aa57f70 Added all BP Items in the game and updated scripts
All Items are added in BP with the values they are meant to have. Starting to now actually implement them into the inventory UI and creating the Inventory UI
2022-11-14 17:42:26 +00:00

66 lines
1.8 KiB
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "UObject/Object.h"
#include "BaseItem.generated.h"
/**
*
*/
UCLASS(Abstract, BlueprintType, Blueprintable, EditInlineNew, DefaultToInstanced)
class THE_TWILIGHT_ABYSS_API UBaseItem : public UObject
{
GENERATED_BODY()
public:
UBaseItem();
virtual class UWorld* GetWorld() const { return World; };
UPROPERTY(Transient)
class UWorld* World;
//The text that will be displayed for using the item (Equip, Eat)
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
FText ItemUseAction;
//The actual mesh of the item
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
class UStaticMesh* ItemMesh;
//The picture of the item icon
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
class UTexture2D* ItemIcon;
//The name of the item
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
FText ItemDisplayName;
//The description of the item
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
FText ItemDescription;
//The cost of the item
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
int32 ItemCostPrice;
//ADD A HEALING ITEM VALUE?
//reference to the UInventoryComponent script
UPROPERTY()
class UInventoryComponent* StoredItems;
//The buy class to purchase the item
virtual void Buy(class UItemPurchaseComponent* PurchaseItem) PURE_VIRTUAL(UBaseItem); // WILL SET THIS UP LATER
//The use Item class to use the item in the player Inventory
virtual void Use(class ATempCharacter* Character) PURE_VIRTUAL(UBaseItem);
//This is the same as the use item class but its in BP instead
UFUNCTION(BlueprintImplementableEvent)
void OnUse(class ATempCharacter* Character);
};