KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
APlayerActor.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
8#pragma once
9
10#include "CoreMinimal.h"
12#include "GameFramework/Character.h"
13#include "IControllable.h"
14#include "NetworkData.h"
15#include "EQuestRole.h"
16#include "APlayerActor.generated.h"
17
23UCLASS(Blueprintable, BlueprintType, ClassGroup=(Dopple))
24class ONEPIECE_API APlayerActor : public ACharacter, public IControllable, public ICompassTargetInterface
25{
26 GENERATED_BODY()
27
28public:
30
31protected:
32 virtual void BeginPlay() override;
33 virtual void GetLifetimeReplicatedProps(TArray<class FLifetimeProperty>& OutLifetimeProps) const override;
34
35 virtual void PossessedBy(AController* NewController) override;
36
37 virtual void Tick(float DeltaTime) override;
38
39 virtual void OnRep_Controller() override;
40
41 UFUNCTION()
42 void OnRep_LookPitch();
43
44 UFUNCTION()
45 void OnRep_AnotherValue();
46
47 UFUNCTION(BlueprintCallable, Category="Command")
48 void RecoveryMovementMode(const EMovementMode InMovementMode);
49
50public:
51 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Components|System")
52 TObjectPtr<class UInteractionSystem> InteractionSystem;
53
54 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Components|System")
55 TObjectPtr<class UHookSystem> HookSystem;
56
57 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Components|Hook")
58 TObjectPtr<class UStaticMeshComponent> HookCable;
59
60 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Components|Hook")
61 TObjectPtr<class UStaticMeshComponent> HookProjectileMesh;
62
63 // grab 시 들어올릴 위치
64 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category="Interaction")
65 TObjectPtr<class USceneComponent> HoldPosition;
66
67protected:
68 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Camera", meta=(AllowPrivateAccess="true"))
69 TObjectPtr<class USpringArmComponent> SpringArmComp;
70
71 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Camera", meta=(AllowPrivateAccess="true"))
72 TObjectPtr<class UCameraComponent> FollowCamera;
73
74 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Camera", meta=(AllowPrivateAccess="true"))
75 TObjectPtr<class UHookComponent> HookComp;
76
77 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category="RushAttack|Owner")
78 TObjectPtr<class UCharacterMovementComponent> MoveComp;
79
80 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Voice", meta=(AllowPrivateAccess="true"))
81 TObjectPtr<class UVoiceConversationSystem> VoiceConversationSystem;
82
83 UPROPERTY(EditAnywhere, BlueprintReadOnly)
84 TObjectPtr<class UChildActorComponent> miniOwlBot;
85
86private:
87 FVector basePos = FVector(238,135.5,60);
88 FRotator baseRot = FRotator(-5.53,212.2,-0.2);
89
90public: // Control Interface
91 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category="Command")
92 void Cmd_Move(const FVector2D& Axis) override;
93 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category="Command")
94 void Cmd_StopMove() override;
95 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category="Command")
96 void Cmd_Look(const FVector2D& Axis) override;
97
98 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category="Command")
99 void Cmd_Jump() override;
100 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category="Command")
101 void Cmd_Run() override;
102
104 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category="Command")
105 void Cmd_RecordStart() override;
106 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category="Command")
107 void Cmd_RecordEnd() override;
108
109 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category="Command")
110 void Cmd_Info() override;
111
112 UFUNCTION(Server, Reliable)
113 void ServerRPC_StopMove();
114 UFUNCTION(NetMulticast, Reliable)
115 void MulticastRPC_StopMove();
116 UFUNCTION(Server, Reliable)
117 void ServerRPC_DoJumpStart();
118 UFUNCTION(NetMulticast, Reliable)
119 void MulticastRPC_DoJumpStart();
120 UFUNCTION(Server, Reliable)
121 void ServerRPC_DoJump();
122 UFUNCTION(NetMulticast, Reliable)
123 void MulticastRPC_DoJump();
124 UFUNCTION(Server, Reliable)
125 void ServerRPC_DoRun();
126 UFUNCTION(NetMulticast, Reliable)
127 void MulticastRPC_DoRun();
128
129public:
130 FORCEINLINE bool GetIsRunning() { return bIsRunning; }
131 FORCEINLINE bool GetIsJumpStart() { return bIsJumpStart; }
132 class AMiniOwlBot* GetMiniOwlBot() const;
133
134 void PlaySpeakInfo(int32 QuestStep);
135
136 EQuestRole GetQuestRole();
137
140 UFUNCTION(BlueprintCallable, Category="Event")
141 void OnGameMessage(const FString& Message);
142
143 UFUNCTION(Server, Reliable)
144 void ServerRPC_Teleport(FTransform TargetTransform);
145
148 UFUNCTION(Server, Reliable)
149 void Server_NotifySpeakJudgeComplete(const struct FResponseSpeakingJudes& Response);
150
153 UFUNCTION(Client, Reliable)
154 void Client_ShowSpeakJudesPopup(const struct FResponseSpeakingJudes& Response);
155
158 UFUNCTION(Server, Reliable)
159 void Server_NotifyConfirmSpeakJudes();
160
163 UFUNCTION(Client, Reliable)
164 void ClientRPC_ShowGameMessage(const FString& Message);
165
169 UFUNCTION(BlueprintCallable, Category = "Voice")
170 void PlayTTSAudio(const TArray<uint8>& AudioData);
171
174 UFUNCTION(BlueprintPure, Category = "UI")
175 class UMainWidget* GetMainWidget() const { return MainWidget; }
176
177 void RequestListenAudio(const FString& AudioText);
178 void RequestSpeakAudio(const FString& AudioText);
179
183 bool IsControlEnabled() const;
184
185private:
186 bool IsMainMap();
187
189 void ApplyAnotherValue();
190
192 void CreateMainWidget();
193 void CreateToastWidget();
194
195 void OnResponseListenAudio(FResponseListenAudio& ResponseData, bool bWasSuccessful);
196 void OnResponseSpeakAudio(FResponseListenAudio& ResponseData, bool bWasSuccessful);
197
200 UFUNCTION()
201 void OnTeleportAllPlayers(FTransform TargetTransform);
202
204 UFUNCTION()
205 void OnFadeOutCompleteForTeleport();
206
207 // UFUNCTION()
208 // void OnUpdateQuestInfo();
209 //
210 // UFUNCTION()
211 // void OnUpdateQuestRole(EQuestRole QuestRole);
212
213 UFUNCTION()
214 void OnRoomIdUpdated(int64 NewRoomId);
215
216 UFUNCTION()
217 void OnRoomLevelUpdated(int32 NewRoomLevel);
218
219 // UFUNCTION()
220 // void OnListenResultUpdated( const FResponseListenResult& Result);
221 //
222 // UFUNCTION()
223 // void OnReadResultUpdated(const FResponseReadResult& Result);
224
225protected:
226 // 서버쪽 pitch 수동으로 동기화
227 // bUsePawnControlRotation은 서버->클라로 전달 안됨
228 UPROPERTY(ReplicatedUsing=OnRep_LookPitch)
229 float LookPitch;
230
232 UPROPERTY(ReplicatedUsing=OnRep_AnotherValue)
233 float AnotherValue;
234
235private:
237 UPROPERTY(EditDefaultsOnly, Category = "UI")
238 TSubclassOf<class UMainWidget> MainWidgetClass;
239
241 UPROPERTY()
242 TObjectPtr<class UMainWidget> MainWidget;
243
244 UPROPERTY(EditDefaultsOnly, Category = "UI")
245 TSubclassOf<class UToastWidget> ToastWidgetClass;
246
247 UPROPERTY()
248 TObjectPtr<class UToastWidget> ToastWidget;
249
251 FTransform PendingTeleportTransform;
252
253 // Movement 관련 변수
254 float WalkSpeed = 200.f;
255 float RunSpeed = 500.f;
256 bool bIsRunning = false;
257 bool bIsJumpStart = false;
258
259 bool bIsRequest = false;
260
261 // Compass
262 UPROPERTY()
263 TMap<AActor*, class UImage*> CompassMarkerMap;
264
265 void UpdateCompassMarkers();
266 FRotator FindRelativeRotationAtTarget(AActor* Target);
267};
EQuestRole
Read 퀘스트에서 플레이어의 역할을 정의합니다.
Definition EQuestRole.h:6
UControllable 클래스를 선언합니다.
네트워크 요청과 응답에 사용되는 구조체 및 설정을 정의합니다.
Main character driven directly by the player.
FORCEINLINE bool GetIsJumpStart()
메인 UI 위젯
Definition UMainWidget.h:17
Speaking Questions 응답 구조체입니다.