Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
InputResponsive.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "GameFramework/Actor.h"
8#include "InputResponsive.generated.h"
9
12
14UCLASS(Abstract, Blueprintable)
16{
17 GENERATED_BODY()
18
19public:
22
23public:
25 virtual UInteractionChannel* Interact(AActor* Caller) override;
26
27public:
29 UFUNCTION(BlueprintCallable, Category = "InputResponsive")
30 bool StartInteraction(AActor* Caller);
31
33 UFUNCTION(BlueprintCallable, Category = "InputResponsive")
34 void StopInteraction();
35
37 UFUNCTION(BlueprintPure, Category = "InputResponsive")
38 bool CanReceiveInput(AActor* Caller) const;
39
40public:
42 FORCEINLINE float GetMaxInteractionDistance() const { return MaxInteractionDistance; }
43
45 FORCEINLINE float GetMaxInteractionAngle() const { return MaxInteractionAngle; }
46
48 FORCEINLINE float GetMaxFacingAngle() const { return MaxFacingAngle; }
49
51 UFUNCTION(BlueprintPure, Category = "InputResponsive")
52 FORCEINLINE UStageEventListenerComponent* GetEventListenerComponent() const
53 {
54 return EventListenerComponent;
55 }
56
57protected:
59 virtual void OnBeginInteraction(const AActor* Caller) override;
60
62 virtual void OnEndInteraction(const AActor* Caller) override;
63
64protected:
66 UFUNCTION(BlueprintImplementableEvent, Category = "InputResponsive")
67 void OnBeginInteraction_Internal(const AActor* Caller);
68
70 UFUNCTION(BlueprintImplementableEvent, Category = "InputResponsive")
71 void OnEndInteraction_Internal(const AActor* Caller);
72
73protected:
75 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "InputResponsive|Interaction", meta = (ClampMin = "0.0", Units = "cm"))
76 float MaxInteractionDistance = 200.0f;
77
79 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "InputResponsive|Interaction", meta = (ClampMin = "0.0", ClampMax = "180.0", Units = "deg"))
80 float MaxInteractionAngle = 45.0f;
81
83 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "InputResponsive|Interaction", meta = (ClampMin = "0.0", ClampMax = "180.0", Units = "deg"))
84 float MaxFacingAngle = 180.0f;
85
86 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "InputResponsive")
87 TObjectPtr<UStageEventListenerComponent> EventListenerComponent;
88
89 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "InputResponsive|Events")
90 TObjectPtr<UStageEventSenderComponent> InteractionStartEventSender;
91
92 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "InputResponsive|Events")
93 TObjectPtr<UStageEventSenderComponent> InteractionEndEventSender;
94};
Definition InputResponsive.h:16
FORCEINLINE float GetMaxInteractionDistance() const
Definition InputResponsive.h:42
FORCEINLINE float GetMaxInteractionAngle() const
Definition InputResponsive.h:45
FORCEINLINE float GetMaxFacingAngle() const
Definition InputResponsive.h:48
Definition InteractableActor.h:16
Definition StageEventBehaviorInterface.h:22
Definition InteractionChannel.h:21
Definition StageEventListenerComponent.h:14
Definition StageEventSenderComponent.h:9