Advertisement
devenshona

BaseItemPickup.h

Jan 20th, 2024
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.62 KB | None | 0 0
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2.  
  3. #pragma once
  4.  
  5. #include "CoreMinimal.h"
  6. #include "InventoryItem.h"
  7. #include "GameFramework/Actor.h"
  8. #include "BaseItemPickup.generated.h"
  9.  
  10. UCLASS()
  11. class INVENTORYSYSTEM_API ABaseItemPickup : public AActor
  12. {
  13.     GENERATED_BODY()
  14.  
  15. public:
  16.     // Sets default values for this actor's properties
  17.     ABaseItemPickup();
  18.  
  19. protected:
  20.     // Called when the game starts or when spawned
  21.     virtual void BeginPlay() override;
  22.  
  23. public:
  24.     // Called every frame
  25.     virtual void Tick(float DeltaTime) override;
  26.  
  27.     //Variables
  28.  
  29.     UPROPERTY(BlueprintReadOnly,EditDefaultsOnly,Category = "Inventory")
  30.     UStaticMeshComponent* PickupMesh;
  31.    
  32.     UPROPERTY(BlueprintReadOnly,EditDefaultsOnly,Category = "Inventory")
  33.     AInventoryItem* InventoryItem;
  34.    
  35. };
  36.  
  37. UENUM(BlueprintType)
  38. enum EItemType : uint8
  39. {
  40.     /*Not Usable*/
  41.     Misc UMETA(DisplayName = "Misc Item"),
  42.    
  43.     /*Used To Add Health*/
  44.     Aid UMETA(DisplayName = "Aid Item"),
  45.    
  46.     /*Used To Prevent Starvation And Dehydration*/
  47.     Food_Drink UMETA(DisplayName = "Food/Drink Item")
  48. };
  49.  
  50. USTRUCT(BlueprintType)
  51. struct FStaticItemInfo : public FTableRowBase
  52. {
  53.     GENERATED_BODY()
  54.     UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "")
  55.     ABaseItemPickup* ItemPickup;
  56.  
  57.     UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "")
  58.     FName ItemName;
  59.  
  60.     UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "")
  61.     FString ItemDescription;
  62.  
  63.     UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "")
  64.     UTexture2D* ItemIcon;
  65.  
  66.     UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "")
  67.     EItemType ItemType;
  68. };
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement