KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
ALuggageHolder.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"
7#include "GameFramework/Actor.h"
8#include "ALuggageHolder.generated.h"
9
10UCLASS()
11class ONEPIECE_API ALuggageHolder : public AActor, public ICompassTargetInterface
12{
13 GENERATED_BODY()
14
15public:
17
18protected:
19 virtual void BeginPlay() override;
20 virtual void Tick(float DeltaTime) override;
21 virtual void GetLifetimeReplicatedProps(TArray<class FLifetimeProperty>& OutLifetimeProps) const override;
22
23public:
24 // Events
25 UFUNCTION(BlueprintImplementableEvent, Category = "Holder")
26 void OnActivate(bool bSuccess);
27
32 UFUNCTION(NetMulticast, Reliable)
33 void Multicast_ShowResultPopup(int32 CorrectAnswerIndex);
34
40 UFUNCTION(NetMulticast, Reliable)
41 void Multicast_ShowWrongPopup(const FString& LuggageColor, const FString& LuggagePattern);
42
43private:
44 UFUNCTION()
45 void OnRep_IsActivated();
46
47 UFUNCTION()
48 void OnRep_CurTarget();
49
50 UFUNCTION()
51 void OnBoxOverlapBegin(
52 UPrimitiveComponent* OverlappedComponent,
53 AActor* OtherActor,
54 UPrimitiveComponent* OtherComp,
55 int32 OtherBodyIndex,
56 bool bFromSweep,
57 const FHitResult& SweepResult);
58
59 bool CheckLuggage(class Aluggage* TargetLuggage, int CorrectIndex);
60
61 void UpdateActivateState(bool State);
62
64 void BillboardInteractWidget();
65
66public:
67 // Components
68 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
69 TObjectPtr<class UBoxComponent> BoxCollision;
70
71 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
72 TObjectPtr<class USkeletalMeshComponent> MeshComponent;
73
74 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spawning")
75 TObjectPtr<class USceneComponent> HoldPos;
76
77 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Widget")
78 TObjectPtr<class UWidgetComponent> WidgetGuideComp;
79
80protected:
81 // 현재 올라가 있는 액터
82 UPROPERTY(ReplicatedUsing=OnRep_CurTarget)
83 TObjectPtr<class AActor> CurTarget;
84
85 // State
86 UPROPERTY(ReplicatedUsing=OnRep_IsActivated, VisibleAnywhere, BlueprintReadOnly, Category = "State")
87 bool bIsActivated = false;
88
89 // Visual Settings
90 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Visual")
91 float ActivatedHeightOffset = 50.0f;
92
93 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Visual")
94 float RotationSpeed = 90.0f;
95
96protected:
97 // Compass Interface
98 virtual void SetCompassMarkerInto(ECompassMarkerType InMarkerType) override;
99
100private:
101 // Luggage Destroy Value
102 FTimerHandle DestroyTimerHandle;
103};
ECompassMarkerType
상호작용 가능한 수하물 액터
Definition luggage.h:15