/*! * @author SIMAILA Djalim */ #pragma once #include "CoreMinimal.h" #include "GameFramework/Actor.h" #include "Item.generated.h" /** * @brief This class is the base class for all items in the game. */ UCLASS(Blueprintable) class SURREALISM_API AItem : public AActor { GENERATED_BODY() public: // Sets default values for this actor's properties AItem(); protected: // Called when the game starts or when spawned virtual void BeginPlay() override; public: // Called every frame virtual void Tick(float DeltaTime) override; /** * @brief The name of the item. */ UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Item") FString item_name = "Item name"; /** * @brief The description of the item. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") FString item_description = "Item description"; /** * @brief This function returns the name of the item. */ UFUNCTION(BlueprintCallable,CallInEditor , Category = "Item") FString get_item_name(); /** * @brief This function returns the description of the item. * @return The description of the item. */ UFUNCTION(BlueprintCallable,CallInEditor, Category = "Item") FString get_item_description(); /** * @brief This function sets the name of the item. * @param new_name The new name of the item. */ UFUNCTION(BlueprintCallable,CallInEditor, Category = "Item") void set_item_name(FString new_name); /** * @brief This function sets the description of the item. * @param new_description The new description of the item. */ UFUNCTION(BlueprintCallable,CallInEditor, Category = "Item") void set_item_description(FString new_description); /** * @brief This function sends the item to the journal. */ UFUNCTION(BlueprintCallable,CallInEditor, Category = "Item") void send_item_to_journal(); };