Space Plunder
Loading...
Searching...
No Matches
CompanionMasterComponent.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"
8#include "CompanionMasterComponent.generated.h"
9
10UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent))
11class AITOOLKIT_API UCompanionMasterComponent : public UCharacterComponent
12{
13 GENERATED_BODY()
14
15public:
16
17 UCompanionMasterComponent();
18
19
20
21 void OpenCompanionOrderMenu();
22 void CloseCompanionOrderMenu();
23 UFUNCTION(BlueprintCallable, Category="Companion|Master")
24 void SetupCompanionWidget();
25
26 UFUNCTION(BlueprintCallable, Category="Companion")
27 void SetCompanionToCommand(AActor* NewCompanion);
28
29 UFUNCTION(BlueprintCallable, Category="Companion")
30 void SetCompanionToCrouching(const bool bValue) const;
31
32 UFUNCTION(BlueprintCallable, Category="Companion")
33 void CommandCompanion(const FHitResult& HitResult);
34
35 UFUNCTION(BlueprintCallable, Category="Companion")
36 bool GetIsCommandingCompanion() const {return bCommandingCompanion;}
37
38 UFUNCTION(BlueprintCallable, Category="Companion")
39 void UpdateInteractionTarget(const FHitResult& InteractionHits);
40
41 UFUNCTION(BlueprintCallable, Category="Companion")
42 void ChangeInteractionSelection(const bool bUpSelection);
43 UFUNCTION(BlueprintCallable, Category="Companion")
44 void UpdateHUDSelection();
45
46 UFUNCTION(BlueprintCallable, Category="Companion")
47 void ToggleHUDPrompts(const bool bShowPrompts = true);
48protected:
49
50 virtual void BeginPlay() override;
51 UFUNCTION(BlueprintCallable, Category="Companion")
52 void UpdateHUDPrompts(const FInteractionData& CompanionInteraction, const FString& Message);
53
54
55 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Companions")
56 FRadialMenuData CompanionOrdersData;
57 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Companions")
58 bool bCommandingCompanion = false;
59
60 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category="Companions")
61 AActor* CompanionActor = nullptr;
62
63 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category="Companions")
64 TArray<AActor*> Companions;
65
66 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category="Companions")
67 class UCompanionWidget* CompanionWidget = nullptr;
68
69 UFUNCTION(BlueprintCallable, Category="Companion")
70 bool GetCurrentActorInteractionData(FInteractionData& InteractionData, FString& Message) const;
71
72 class ICompanionInterface* GetCompanionComponent() const;
73
74private:
75 //- Widgets //
76 UPROPERTY(EditAnywhere)
77 TSubclassOf<class UUserWidget> CompanionWidgetClass = nullptr;
78
79 void GetCompanionHUD();
80 class ICompanionHUD* CompanionHUD = nullptr;
81
82
83 UPROPERTY(VisibleAnywhere)
84 AActor* LastHitActor = nullptr;
85
86 UPROPERTY(VisibleAnywhere, Category="Interaction")
87 int32 SelectedInteraction = 0;
88
89};
90
91
92
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition CompanionHUD.h:20
Definition CompanionInterface.h:18
Definition Interaction.Build.cs:6
Represents a character component that can be added to an actor.
Definition CompanionWidget.h:12
Definition BaseData.h:420
Definition RadialWheelData.h:100