2022-11-14 14:57:02 +00:00
|
|
|
// 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"
|
|
|
|
|
2022-11-14 17:42:26 +00:00
|
|
|
|
2022-11-14 14:57:02 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
UCLASS(Abstract, BlueprintType, Blueprintable, EditInlineNew, DefaultToInstanced)
|
|
|
|
class THE_TWILIGHT_ABYSS_API UBaseItem : public UObject
|
|
|
|
{
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
public:
|
2022-11-14 16:52:57 +00:00
|
|
|
UBaseItem();
|
2022-11-14 17:42:26 +00:00
|
|
|
|
|
|
|
virtual class UWorld* GetWorld() const { return World; };
|
|
|
|
|
|
|
|
UPROPERTY(Transient)
|
|
|
|
class UWorld* World;
|
|
|
|
|
2022-11-14 14:57:02 +00:00
|
|
|
//The text that will be displayed for using the item (Equip, Eat)
|
2022-11-14 17:42:26 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
2022-11-14 14:57:02 +00:00
|
|
|
FText ItemUseAction;
|
|
|
|
|
|
|
|
//The actual mesh of the item
|
2022-11-14 17:42:26 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
2022-11-14 14:57:02 +00:00
|
|
|
class UStaticMesh* ItemMesh;
|
|
|
|
|
|
|
|
//The picture of the item icon
|
2022-11-14 17:42:26 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
2022-11-14 14:57:02 +00:00
|
|
|
class UTexture2D* ItemIcon;
|
|
|
|
|
|
|
|
//The name of the item
|
2022-11-14 17:42:26 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
2022-11-14 14:57:02 +00:00
|
|
|
FText ItemDisplayName;
|
|
|
|
|
|
|
|
//The description of the item
|
2022-11-14 17:42:26 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
2022-11-14 14:57:02 +00:00
|
|
|
FText ItemDescription;
|
|
|
|
|
2022-11-14 15:53:50 +00:00
|
|
|
//The cost of the item
|
2022-11-14 17:42:26 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
2022-11-14 15:53:50 +00:00
|
|
|
int32 ItemCostPrice;
|
|
|
|
|
|
|
|
//ADD A HEALING ITEM VALUE?
|
2022-11-14 17:42:26 +00:00
|
|
|
|
2022-11-14 14:57:02 +00:00
|
|
|
//reference to the UInventoryComponent script
|
|
|
|
UPROPERTY()
|
|
|
|
class UInventoryComponent* StoredItems;
|
2022-11-14 15:53:50 +00:00
|
|
|
|
|
|
|
//The buy class to purchase the item
|
2022-11-14 17:42:26 +00:00
|
|
|
virtual void Buy(class UItemPurchaseComponent* PurchaseItem) PURE_VIRTUAL(UBaseItem); // WILL SET THIS UP LATER
|
2022-11-14 15:53:50 +00:00
|
|
|
|
|
|
|
//The use Item class to use the item in the player Inventory
|
|
|
|
virtual void Use(class ATempCharacter* Character) PURE_VIRTUAL(UBaseItem);
|
2022-11-14 19:22:50 +00:00
|
|
|
|
2022-11-14 16:52:57 +00:00
|
|
|
//This is the same as the use item class but its in BP instead
|
|
|
|
UFUNCTION(BlueprintImplementableEvent)
|
2022-11-14 17:42:26 +00:00
|
|
|
void OnUse(class ATempCharacter* Character);
|
2022-11-14 14:57:02 +00:00
|
|
|
};
|