Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
InteractabilityComponent.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CK_UE.h"
6#include "Components/ActorComponent.h"
8#include "InteractabilityComponent.generated.h"
9
11
12UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
13class CK_UE_API UInteractabilityComponent : public UActorComponent
14{
15 GENERATED_BODY()
16
17public:
18 UInteractabilityComponent();
19
20public:
21 void RegisterToChannel(UInteractionChannel* Channel);
22 void UnregisterFromChannel();
23
24public:
25 bool IsInteractable() const;
26
27 FORCEINLINE bool IsRegistered() const
28 {
29 return ActiveChannel != nullptr;
30 }
31
32 FORCEINLINE UInteractionChannel* GetActiveChannel() const
33 {
34 return ActiveChannel.Get();
35 }
36
37protected:
38 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Interactability")
39 bool bCanInteractByDefault = true;
40
41 UPROPERTY(EditAnywhere, Instanced, BlueprintReadOnly, Category = "Interactability")
42 TObjectPtr<UInteractionRule> InteractionRule;
43
44private:
45 UPROPERTY(Transient)
46 TObjectPtr<UInteractionChannel> ActiveChannel;
47};
Definition InteractionChannel.h:21
Definition InteractionRule.h:15