Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
EventGate.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Engine/TriggerBox.h"
7#include "GameFramework/Actor.h"
10#include "EventGate.generated.h"
11
13class UBoxComponent;
16
17
18UENUM(Blueprintable, BlueprintType)
19enum class EGateDetectionTiming : uint8
20{
21 // 플레이어가 게이트 영역에 진입하는 순간 이벤트 발화.
22 OnBeginOverlap UMETA(DisplayName = "On Begin Overlap"),
23
24 // 플레이어가 게이트 영역에서 이탈하는 순간 이벤트 발화.
25 OnEndOverlap UMETA(DisplayName = "On End Overlap")
26};
27
28
29UCLASS(Blueprintable)
31{
32 GENERATED_BODY()
33
34public:
35 AEventGate();
36
37public:
38 UFUNCTION(BlueprintPure, Category = "EventGate")
39 FName GetId() const;
40
41 UFUNCTION(BlueprintPure, Category = "EventGate")
42 virtual UStageEventListenerComponent* GetEventListenerComponent() const
43 {
44 return EventListenerComponent;
45 }
46
47
48protected:
49 virtual void BeginPlay() override;
50 virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
51 virtual void OnBeginInteraction(const AActor* Caller) override;
52 virtual void OnEndInteraction(const AActor* Caller) override;
53
54protected:
55 UFUNCTION()
56 void HandleBoxBeginOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
57
58 UFUNCTION()
59 void HandleBoxEndOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex);
60
61 UFUNCTION(BlueprintImplementableEvent, Category = "EventGate")
62 void OnBeginInteraction_Internal(const AActor* Caller);
63
64 UFUNCTION(BlueprintImplementableEvent, Category = "EventGate")
65 void OnEndInteraction_Internal(const AActor* Caller);
66
67 UFUNCTION(BlueprintImplementableEvent, Category = "EventGate")
68 void OnGateOverlapEnter(AActor* OtherActor, UPrimitiveComponent* OtherComp);
69
70 UFUNCTION(BlueprintImplementableEvent, Category = "EventGate")
71 void OnGateOverlapExit(AActor* OtherActor, UPrimitiveComponent* OtherComp);
72
73private:
74 void TryFireGateEvent(AActor* OtherActor);
75
76protected:
77 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "EventGate")
78 bool bIgnoreOverlap = false;
79
80 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "EventGate")
82
83 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "EventGate")
84 TObjectPtr<UStageEventListenerComponent> EventListenerComponent;
85
86 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "EventGate")
87 TObjectPtr<UStageEventSenderComponent> GateEventSender;
88
89 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "EventGate")
90 TObjectPtr<UBoxComponent> BoxComponent;
91
92private:
93 UPROPERTY()
94 FName StageEventID_DEPRECATED = NAME_None;
95};
EGateDetectionTiming
Definition EventGate.h:20
Definition EventGate.h:31
Definition InteractableActor.h:16
Definition StageEventBehaviorInterface.h:22
Definition StageEventListenerComponent.h:14
Definition StageEventSenderComponent.h:9
Definition StoryboardDefinition.h:36