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"
8#include "SectionGate.generated.h"
9
10
11class UBoxComponent;
12class UStageEventListenerComponent;
13
14
15UENUM(BlueprintType)
16enum class EGateState : uint8
17{
18 Locked,
20};
21
22
23UENUM(BlueprintType)
24enum class EGateOperation : uint8
25{
26 Lock,
27 Unlock,
28 Toggle,
29};
30
31
32UCLASS(Blueprintable, BlueprintType)
33class CK_UE_API ASectionGate : public AActor, public IStageEventListenerInterface
34{
35 GENERATED_BODY()
36
37public:
39
40public:
41 UFUNCTION(BlueprintCallable, Category = "SectionGate")
42 void SetGateState(const EGateOperation Operation);
43
44 void ApplyGateState(EGateState NewState, bool bForce = false);
45
46public:
47 UFUNCTION(BlueprintPure, Category = "SectionGate")
48 FORCEINLINE EGateState GetGateState() const
49 {
50 return CurrentState;
51 }
52
53 UFUNCTION(BlueprintPure, Category = "SectionGate")
54 virtual EStageEvent GetStageEvent() const override
55 {
57 }
58
59 UFUNCTION(BlueprintPure, Category = "SectionGate")
60 FORCEINLINE bool IsLocked() const
61 {
62 return CurrentState == EGateState::Locked;
63 }
64
65 UFUNCTION(BlueprintPure, Category = "SectionGate")
66 virtual UStageEventListenerComponent* GetEventListenerComponent() const override
67 {
68 return EventListenerComponent;
69 }
70
71protected:
72 virtual void BeginPlay() override;
73
74protected:
75 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SectionGate")
76 TObjectPtr<UStageEventListenerComponent> EventListenerComponent;
77
78 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SectionGate")
79 TObjectPtr<UBoxComponent> BoxComponent;
80
81 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "SectionGate")
82 EGateState InitialGateState = EGateState::Unlocked;
83
84private:
85 UPROPERTY(Transient, VisibleInstanceOnly, BlueprintReadOnly, Category = "SectionGate", meta = (AllowPrivateAccess = "true"))
87};
EStageEvent
Definition EStageEventEnums.h:5
EGateState
Definition SectionGate.h:17
EGateOperation
Definition SectionGate.h:25
Definition SectionGate.h:34
Definition StageEventListenerInterface.h:24