Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
SectionGate.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 "GameFramework/Actor.h"
9#include "SectionGate.generated.h"
10
11
12class UBoxComponent;
15
16
17UENUM(BlueprintType)
18enum class EGateState : uint8
19{
20 Locked,
22};
23
24
25UCLASS(Blueprintable, BlueprintType)
26class CK_UE_API ASectionGate : public AActor, public IStageEventBehaviorInterface
27{
28 GENERATED_BODY()
29
30public:
32
33public:
34 UFUNCTION(BlueprintCallable, Category = "SectionGate")
35 void SetGateState(const EGateOperation Operation);
36
37 void ApplyGateState(EGateState NewState, bool bForce = false);
38
39public:
40 UFUNCTION(BlueprintPure, Category = "SectionGate")
41 FORCEINLINE EGateState GetGateState() const
42 {
43 return CurrentState;
44 }
45
46 UFUNCTION(BlueprintPure, Category = "SectionGate")
47 FORCEINLINE bool IsLocked() const
48 {
49 return CurrentState == EGateState::Locked;
50 }
51
52 UFUNCTION(BlueprintPure, Category = "SectionGate")
53 virtual UStageEventListenerComponent* GetEventListenerComponent() const
54 {
55 return EventListenerComponent;
56 }
57
58protected:
59 virtual void BeginPlay() override;
60
61protected:
62 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SectionGate")
63 TObjectPtr<UStageEventListenerComponent> EventListenerComponent;
64
65 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SectionGate")
66 TObjectPtr<UStageEventSenderComponent> StateChangedEventSender;
67
68 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SectionGate")
69 TObjectPtr<UBoxComponent> BoxComponent;
70
71 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "SectionGate")
72 EGateState InitialGateState = EGateState::Unlocked;
73
74private:
75 UPROPERTY(Transient, VisibleInstanceOnly, BlueprintReadOnly, Category = "SectionGate", meta = (AllowPrivateAccess = "true"))
77};
EGateOperation
Definition EGateOperation.h:8
EGateState
Definition SectionGate.h:19
Definition SectionGate.h:27
Definition StageEventBehaviorInterface.h:22
Definition StageEventListenerComponent.h:14
Definition StageEventSenderComponent.h:9