KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
ASpeakStageActor.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 "ASpeakStageActor.generated.h"
8
9DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSpeakerChangedDelegate, APlayerState*, NewSpeaker);
10
21UCLASS()
22class ONEPIECE_API ASpeakStageActor : public AActor
23{
24 GENERATED_BODY()
25
26public:
29
31 virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
32
33public:
34 UFUNCTION(BlueprintCallable, Category = "SpeakStage")
35 FORCEINLINE class ALingoPlayerState* GetCurrentSpeaker() const { return CurrentSpeaker; }
36
37 UFUNCTION(BlueprintCallable, Category = "SpeakStage")
38 FORCEINLINE int32 GetCurrentStepIndex() const { return CurrentStepIndex; }
39
40 UFUNCTION(BlueprintCallable, Category = "SpeakStage")
41 FString GetCurrentQuestion() const;
42
43 UFUNCTION(BlueprintCallable, Category = "SpeakStage")
44 int32 GetTotalQuestionsCount();
45
46 UFUNCTION(BlueprintCallable, Category = "SpeakStage")
47 int32 GetTotalQuestions() const;
48
53 UFUNCTION(BlueprintCallable, Category = "SpeakStage")
54 void StartStageForPlayer(class ALingoPlayerState* Player);
55
60 UFUNCTION(BlueprintCallable, Category = "SpeakStage")
61 void EndStage();
62
63public:
68 void NotifyAnswerComplete(class ALingoPlayerState* Player);
69
70 bool IsMyTurn(class ALingoPlayerState* lingo_player_state);
71
72protected:
75 UFUNCTION(NetMulticast, Reliable)
76 void Multicast_NotifySpeakQuestStarted(const FString& PlayerName);
77
78
80 UFUNCTION()
81 void OnRep_CurrentSpeaker();
82
83private:
88 void AdvanceStep();
89
90public:
92 UPROPERTY(BlueprintAssignable, Category = "SpeakStage|Events")
93 FOnSpeakerChangedDelegate OnSpeakerChanged;
94
95protected:
97 UPROPERTY(ReplicatedUsing = OnRep_CurrentSpeaker)
98 TObjectPtr<class ALingoPlayerState> CurrentSpeaker;
99
101 UPROPERTY(Replicated)
102 int32 CurrentStepIndex;
103};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSpeakerChangedDelegate, APlayerState *, NewSpeaker)
Speak Stage 시스템