KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
ADropper.h
이 파일의 문서화 페이지로 가기
1// Copyright (c) 2025 Doppleddiggong.
2// Proprietary and confidential.
3
4#pragma once
5
6#include "CoreMinimal.h"
7#include "NetworkData.h"
8#include "GameFramework/Actor.h"
9#include "ADropper.generated.h"
10
11USTRUCT(BlueprintType)
13{
14 GENERATED_BODY()
15
16
17 UPROPERTY(EditAnywhere, BlueprintReadWrite)
18 FWordInfo word1;
19
20 UPROPERTY(EditAnywhere, BlueprintReadWrite)
21 FWordInfo word2;
22
24 UPROPERTY(EditAnywhere, BlueprintReadWrite)
25 int32 SpawnIndex = -1;
26
28
29 FLuggageData(const FWordInfo& InWord1, const FWordInfo& InWord2, int32 InSpawnIndex = -1)
30 : word1(InWord1)
31 , word2(InWord2)
32 , SpawnIndex(InSpawnIndex)
33 {}
34};
35
36UCLASS()
37class ONEPIECE_API ADropper : public AActor
38{
39 GENERATED_BODY()
40
41public:
42 ADropper();
43
45 void SetSpawnClass(TSubclassOf<AActor> InClass) { SpawnClass = InClass; }
46
48 void SetSpawnData(const FLuggageData& InData) { NextData = InData; }
49
51 UFUNCTION(BlueprintCallable)
52 bool RequestSpawn();
53
54 FORCEINLINE bool IsBusy() const { return bIsSpawnIng; };
55
56 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Index)
57 int32 DropperIndex = 0;
58
59protected:
61 void Spawn();
62
63 UFUNCTION(Server, Reliable)
64 void Server_Spawn();
65
67 UFUNCTION(NetMulticast, Reliable)
68 void Multicast_PlayAnimation();
69
71 UFUNCTION(NetMulticast, Reliable)
72 void Multicast_DisableCollision();
73
75 UFUNCTION(NetMulticast, Reliable)
76 void Multicast_RestoreCollision();
77
78 virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
79
80private:
81 void OnDelayCompleted();
82 void OnRestoreCompleted();
83
84private:
86 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Components", meta=(AllowPrivateAccess="true"))
87 TObjectPtr<USceneComponent> SpawnPos;
88
90 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Components", meta=(AllowPrivateAccess="true"))
91 TObjectPtr<USkeletalMeshComponent> SkeletalMesh;
92
94 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Components", meta=(AllowPrivateAccess="true"))
95 TObjectPtr<UStaticMeshComponent> BoxCollision;
96
98 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Animation", meta=(AllowPrivateAccess="true"))
99 TObjectPtr<UAnimationAsset> AnimToPlay;
100
102 UPROPERTY(Replicated)
103 TSubclassOf<AActor> SpawnClass;
104
106 UPROPERTY(Replicated)
107 FLuggageData NextData;
108
110 // UPROPERTY(Replicated)
111 // FFoodData NextFoodData;
112
114 UPROPERTY(Replicated)
115 bool bIsSpawnIng = false;
116
117 FTimerHandle DelayTimerHandle;
118 FTimerHandle RestoreTimerHandle;
119};
네트워크 요청과 응답에 사용되는 구조체 및 설정을 정의합니다.
void SetSpawnData(const FLuggageData &InData)
[Luggage용] 스폰 전에 Dropper가 생성될 액터에게 넘겨줄 데이터 등록
Definition ADropper.h:48
void SetSpawnClass(TSubclassOf< AActor > InClass)
스폰 전에 Dropper가 어떤 클래스를 스폰할지 등록
Definition ADropper.h:45
FORCEINLINE bool IsBusy() const
Definition ADropper.h:54
FLuggageData(const FWordInfo &InWord1, const FWordInfo &InWord2, int32 InSpawnIndex=-1)
Definition ADropper.h:29
단어 정보 구조체