Space Plunder
Loading...
Searching...
No Matches
InteractablePawn.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Data/BaseData.h"
7#include "GameFramework/Pawn.h"
10#include "Interfaces/SaveLoad.h"
11#include "InteractablePawn.generated.h"
12
13DECLARE_LOG_CATEGORY_CLASS(LogInteractablePawn, Display, All);
14
15UCLASS()
16class INTERACTION_API AInteractablePawn : public APawn, public IBaseInterface, public ISaveLoad
17{
18 GENERATED_BODY()
19
20public:
22
23 // UFUNCTION(BlueprintCallable, Category = "Base Helpers")
24 // virtual void SetGravityEnabled(const bool bValue) override;
25
26 UFUNCTION()
27 virtual void ReceiveStartFocus(AActor* Caller);
28 UFUNCTION()
29 virtual void ReceiveEndFocus(AActor* Caller);
30 UFUNCTION()
31 virtual void ReceiveOnInteract(AActor* Caller, const EInteractionType InteractionType);
32 UFUNCTION()
33 virtual void ReceiveOnEndInteract(AActor* Caller);
34 UFUNCTION()
35 virtual void ReceiveOnOverlap(AActor* Caller);
36 UFUNCTION()
37 virtual void ReceiveOnEndOverlap(AActor* Caller);
38 UFUNCTION()
39 virtual void ReceiveToggleSwitch(AActor* Caller, const bool bOn);
40
41 UFUNCTION()
42 virtual void InteractionDataUpdated();
43
44
45 // virtual FString GetObjectDisplayName() const override{return "@TODO CHANGE INTERACTABLE PAWN";};
46
47
48 virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
49
50
51 // virtual FInteractionData& GetInteractionData() override{return InteractionData;};
52
53
54protected:
55 virtual void BeginPlay() override;
56
57 virtual bool SaveGame() override;
58 virtual bool LoadGame() override;
59
60
61 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Audio")
62 class UAudioReactionComponent* AudioReactionComponent;
63 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Interaction")
64 class UInteractableActorComponent* InteractableActorComponent;
65 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="AI")
66 class UAIPerceptionStimuliSourceComponent* PerceptionStimuliComponent;
67
68 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Debugging")
69 bool bDebuggingMode = false;
70
71 //- Will return Actor Location as Default //
72 UFUNCTION(BlueprintNativeEvent, Category = "Interaction")
73 FVector GetCustomInteractionLocation() const;
74
75 void LogDebugError(const FString& Message) const;
76 void LogDebugError(const FString& Message, const int32 Value) const;
77 void LogDebugError(const FString& Message, const float Value) const;
78 void LogDebugWarning(const FString& Message) const;
79 void LogDebugWarning(const FString& Message, const int32 Value) const;
80 void LogDebugWarning(const FString& Message, const float Value) const;
81
82 void LogDebugMessage(const FString& Message, const bool bWarning = false, const bool bError = false) const;
83 void LogDebugMessage(const FString& Message, const int32 Value, const bool bWarning = false, const bool bError = false) const;
84 void LogDebugMessage(const FString& Message, const float Value, const bool bWarning = false, const bool bError = false) const;
85 void LogDebugMessage(const FString& Message, const bool bValue, const bool bWarning, const bool bError) const;
86 void LogOnScreenMessage(const int32 Key, const FString& Message, FColor Color = FColor::Green) const;
87
88 void SetCategoryName(const FLogCategoryBase& Category){CategoryName = Category.GetCategoryName();};
89
90private:
91 FLogCategoryName CategoryName = LogInteractablePawn.GetCategoryName();
92
93};
94
EInteractionType
Definition BaseData.h:149
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
DECLARE_LOG_CATEGORY_CLASS(LogInteractablePawn, Display, All)
Definition InteractablePawn.h:17
Definition BaseInterface.h:17
Definition SaveLoad.h:20
Definition Interaction.Build.cs:6