KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
AWheatly.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 "AWheatly.generated.h"
9
11UENUM(BlueprintType)
12enum class EWheatlyAnim : uint8
13{
14 PowerOn UMETA(DisplayName = "Power On"),
15 Talk UMETA(DisplayName = "Talk"),
16 Reaction_01 UMETA(DisplayName = "Reaction 01"),
17 Reaction_02 UMETA(DisplayName = "Reaction 02"),
18 Reaction_03 UMETA(DisplayName = "Reaction 03"),
19 Reaction_04 UMETA(DisplayName = "Reaction 04"),
20 Reaction_05 UMETA(DisplayName = "Reaction 05"),
21 Max UMETA(Hidden)
22};
23
29UCLASS()
30class ONEPIECE_API AWheatly : public AActor, public ICompassTargetInterface
31{
32 GENERATED_BODY()
33
34
35public:
36 AWheatly();
37
38 virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
39
40 virtual void Tick(float DeltaSeconds) override;
41
42protected:
43 virtual void BeginPlay() override;
44
45public:
48 FORCEINLINE void SetAnimationType(EWheatlyAnim InAnimType) { AnimType = InAnimType; }
49
52 UFUNCTION(BlueprintCallable, Category = "Animation")
53 void PlayAnimation(EWheatlyAnim InAnimType);
54
58 void SyncSpeakScenarioData(class APlayerActor* Player, const struct FResponseSpeakScenario& Data);
59
62 UFUNCTION(BlueprintCallable, Category = "SpeakStage")
63 void SetSpeakStageActor(class ASpeakStageActor* InSpeakStageActor);
64
67 void CompleteSpeakQuest(class APlayerActor* Player);
68
69protected:
72 UFUNCTION(NetMulticast, Reliable)
73 void Multicast_PlayAnimation(EWheatlyAnim InAnimType);
74
75 UFUNCTION()
76 void OnRep_EyeColor();
77
78 UFUNCTION()
79 void OnRep_EyeSightState();
80
83 UFUNCTION()
84 void OnInteractionTriggered(class AActor* InteractingActor);
85
88 UFUNCTION()
89 void OnOutlineStateChanged(bool bShouldShowOutline);
90
93 UFUNCTION()
94 void OnSpeakStageSpeakerChanged(class APlayerState* NewSpeaker);
95
96private:
97 bool IsInRange(const class APawn* LocalPawn) const;
98
101 void ChangeEyeColor(FLinearColor newColor);
102
103 void UpdateEyeSight(const FVector& Start, const FVector& End);
104 void ApplyEyeSight();
105
106
107protected:
109 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
110 TObjectPtr<class USkeletalMeshComponent> MeshComponent;
111
113 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
114 TObjectPtr<class UStaticMeshComponent> EyeMesh;
115
117 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
118 TObjectPtr<class UBoxComponent> PlayerDetectionZone;
119
121 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
122 TObjectPtr<class UStaticMeshComponent> EyeSightComp;
123
125 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
126 TObjectPtr<class UInteractableComponent> InteractableComp;
127
129 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Components")
130 TObjectPtr<class UWidgetComponent> WidgetComp;
131
133 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Transient, Category = "Materials", meta = (AllowPrivateAccess = "true"))
134 TObjectPtr<class UMaterialInstanceDynamic> EyeMaterial;
135
136 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Transient, Category = "Materials", meta = (AllowPrivateAccess = "true"))
137 TObjectPtr<class UMaterialInstanceDynamic> EyeTraceMaterial;
138
140 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Animation")
141 TMap<EWheatlyAnim, TObjectPtr<class UAnimSequence>> AnimSequences;
142
143private:
144 UPROPERTY()
145 TObjectPtr<class ASpeakStageActor> SpeakStageActor;
146
147 UPROPERTY(Transient, ReplicatedUsing = OnRep_EyeColor)
148 FLinearColor ReplicatedEyeColor;
149
150 // EyeSight 동기화용 상태
151 UPROPERTY(ReplicatedUsing = OnRep_EyeSightState)
152 FVector ReplicatedEyeSightEnd = FVector::ZeroVector;
153
154 UPROPERTY(ReplicatedUsing = OnRep_EyeSightState)
155 bool bEyeSightVisible = false;
156
158 EWheatlyAnim AnimType;
159
161 float CurAnimDuration;
162
163 bool bShowDebugInfo = true;
164
165 float IndicatorBaseLength = 1.0f;
166 float IndicatorBaseRadius = 1.0f;
167
168protected:
169 // Compass Interface
170 virtual void SetCompassMarkerInto(ECompassMarkerType InMarkerType) override;
171};
EWheatlyAnim
Wheatly 애니메이션 타입
Definition AWheatly.h:13
ECompassMarkerType
Main character driven directly by the player.
Speak Stage 시스템
Wheatly NPC 액터
Definition AWheatly.h:31
FORCEINLINE void SetAnimationType(EWheatlyAnim InAnimType)
애니메이션 타입 설정
Definition AWheatly.h:48
Speak 시나리오 응답 구조체입니다.