2022-11-10 11:52:10 +00:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
#include "GameFramework/Character.h"
|
2022-11-15 03:27:44 +00:00
|
|
|
#include "the_twilight_abyss/BaseItems/Items/BaseItem.h"
|
2022-11-10 11:52:10 +00:00
|
|
|
#include "TempCharacter.generated.h"
|
|
|
|
|
|
|
|
UCLASS()
|
|
|
|
class THE_TWILIGHT_ABYSS_API ATempCharacter : public ACharacter
|
|
|
|
{
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
2022-11-14 16:58:20 +00:00
|
|
|
//Player inventory
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Inventory, meta = (AllowPrivateAccess = "true"))
|
|
|
|
class UInventoryComponent* Inventory; //Using the InventoryComponent class
|
|
|
|
|
2022-11-10 11:52:10 +00:00
|
|
|
public:
|
|
|
|
// Sets default values for this character's properties
|
|
|
|
ATempCharacter();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Called when the game starts or when spawned
|
|
|
|
virtual void BeginPlay() override;
|
|
|
|
|
|
|
|
void ForwardInput(float Axis);
|
|
|
|
void RightMoveInput(float Axis);
|
|
|
|
|
|
|
|
public:
|
|
|
|
// Called every frame
|
|
|
|
virtual void Tick(float DeltaTime) override;
|
|
|
|
|
|
|
|
// Called to bind functionality to input
|
|
|
|
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
2022-11-10 12:57:31 +00:00
|
|
|
|
2022-11-11 20:21:44 +00:00
|
|
|
void KeyPressed();
|
2022-11-11 22:21:10 +00:00
|
|
|
|
|
|
|
UPROPERTY(EditAnyWhere)
|
|
|
|
float TraceDistance = 200;
|
|
|
|
|
|
|
|
void LineTraceLogic();
|
2022-11-14 15:53:50 +00:00
|
|
|
|
2022-11-19 20:08:00 +00:00
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category= "Health")
|
2022-11-14 15:53:50 +00:00
|
|
|
float Health;
|
2022-11-14 16:52:57 +00:00
|
|
|
|
2022-11-19 20:08:00 +00:00
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category= "Gold")
|
2022-11-15 03:27:44 +00:00
|
|
|
int GoldBalance;
|
|
|
|
|
2022-11-23 00:55:55 +00:00
|
|
|
UPROPERTY(VisibleDefaultsOnly, Category = "LineTrace")
|
|
|
|
bool bHit;
|
|
|
|
|
2022-11-14 16:52:57 +00:00
|
|
|
//Using the item in the inventory
|
|
|
|
UFUNCTION(BlueprintCallable, Category= "Items")
|
2022-11-15 03:27:44 +00:00
|
|
|
void UseItem(class UBaseItem* Item); // Overriding the BaseItem Class
|
|
|
|
|
2022-11-18 13:07:44 +00:00
|
|
|
UPROPERTY(EditAnywhere, Category= "Items")
|
|
|
|
UBaseItem* ItemToBuy;
|
2022-11-10 11:52:10 +00:00
|
|
|
};
|