KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
AGate.h
이 파일의 문서화 페이지로 가기
1// Copyright (c) 2025 Doppleddiggong. All rights reserved. Unauthorized copying, modification, or distribution of this file, via any medium is strictly prohibited. Proprietary and confidential.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "GameFramework/Actor.h"
7#include "AGate.generated.h"
8
11
13UCLASS()
14class ONEPIECE_API AGate : public AActor
15{
16 GENERATED_BODY()
17
18public:
20 AGate();
21
23 UFUNCTION(BlueprintCallable, Category = "Gate")
24 void OpenDoor();
25
27 UFUNCTION(BlueprintCallable, Category = "Gate")
28 void CloseDoor();
29
30protected:
32 virtual void BeginPlay() override;
33
37 UFUNCTION()
38 void OnDoorMessage(int32 InGateID, bool Open, AActor* EventInstigator);
39
41 UFUNCTION()
42 void OnOverlapBegin(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
43
45 UFUNCTION()
46 void OnOverlapEnd(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex);
47
49 UFUNCTION(BlueprintImplementableEvent, Category = "Gate")
50 void PlayOpenDoorAnimation();
51
53 UFUNCTION(BlueprintImplementableEvent, Category = "Gate")
54 void PlayCloseDoorAnimation();
55
57 bool IsPlayerActor(const AActor* OtherActor) const;
58
59protected:
60 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
61 TObjectPtr<class USceneComponent> RootComp;
62
63 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
64 TObjectPtr<class UStaticMeshComponent> Door_Left;
65
66 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
67 TObjectPtr<class UStaticMeshComponent> Door_Right;
68
69 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
70 TObjectPtr<class UBoxComponent> BoxCollision;
71
72 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gate")
73 int32 GateID;
74
75private:
76 UPROPERTY(VisibleInstanceOnly, Category = "Gate")
77 bool bIsOpen;
78
79 UPROPERTY()
80 TArray<TObjectPtr<class APawn>> OverlappingPawns;
81};
플레이어 접근 및 브로드캐스트 메시지에 반응해 문을 여닫는 액터입니다.
Definition AGate.h:15