diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index 5e6ba54..433a8e5 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b452da02d420447c486ed947537ab3030dddf2942de6533b784f7ec131498696 -size 23264 +oid sha256:659d40d87576c276667484be63bcb818039f4f8ac40525cdcea92c90eee7aaec +size 23245 diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp new file mode 100644 index 0000000..d3e0cb0 --- /dev/null +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp @@ -0,0 +1,36 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "InventoryComponent.h" + + +// Sets default values for this component's properties +UInventoryComponent::UInventoryComponent() +{ + // Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features + // off to improve performance if you don't need them. + PrimaryComponentTick.bCanEverTick = true; + + // ... +} + + +// Called when the game starts +void UInventoryComponent::BeginPlay() +{ + Super::BeginPlay(); + + // ... + +} + + +// Called every frame +void UInventoryComponent::TickComponent(float DeltaTime, ELevelTick TickType, + FActorComponentTickFunction* ThisTickFunction) +{ + Super::TickComponent(DeltaTime, TickType, ThisTickFunction); + + // ... +} + diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.h b/Source/the_twilight_abyss/BaseItems/InventoryComponent.h new file mode 100644 index 0000000..e4fbe77 --- /dev/null +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.h @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Components/ActorComponent.h" +#include "InventoryComponent.generated.h" + + +UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent)) +class THE_TWILIGHT_ABYSS_API UInventoryComponent : public UActorComponent +{ + GENERATED_BODY() + +public: + // Sets default values for this component's properties + UInventoryComponent(); + +protected: + // Called when the game starts + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void TickComponent(float DeltaTime, ELevelTick TickType, + FActorComponentTickFunction* ThisTickFunction) override; +}; diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.cpp b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.cpp new file mode 100644 index 0000000..62ba79f --- /dev/null +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.cpp @@ -0,0 +1,4 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "BaseItem.h" diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h new file mode 100644 index 0000000..74a4e45 --- /dev/null +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h @@ -0,0 +1,41 @@ +// 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: + //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; + + //reference to the UInventoryComponent script + UPROPERTY() + class UInventoryComponent* StoredItems; +};