Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
CK_BPFunctionLibrary.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Kismet/BlueprintAsyncActionBase.h"
7#include "Kismet/BlueprintFunctionLibrary.h"
8#include "Containers/Ticker.h"
13#include "SubSystem/World/PoolWorldSubsystem.h"
17#include "CK_BPFunctionLibrary.generated.h"
18
19struct FGameplayEffectContextHandle;
21class UWorld;
22
23DECLARE_DYNAMIC_MULTICAST_DELEGATE(FRealTimeDelayCompleted);
24
25
27UCLASS()
28class CK_UE_API UCK_RealTimeDelayAction : public UBlueprintAsyncActionBase
29{
30 GENERATED_BODY()
31
32public:
33 UPROPERTY(BlueprintAssignable)
34 FRealTimeDelayCompleted Completed;
35
41 UFUNCTION(BlueprintCallable, Category = "Utilities|Flow Control", meta = (BlueprintInternalUseOnly = "true", WorldContext = "WorldContextObject", DisplayName = "Real Time Delay", Keywords = "Delay RealTime Unscaled"))
42 static UCK_RealTimeDelayAction* RealTimeDelay(UObject* WorldContextObject, float Duration = 0.2f);
43
44 virtual void Activate() override;
45 virtual void BeginDestroy() override;
46
47private:
49 bool UpdateDelay(float DeltaTime);
50
51 TWeakObjectPtr<UObject> CachedWorldContext;
52 TWeakObjectPtr<UWorld> CachedWorld;
53 FTSTicker::FDelegateHandle TickerHandle;
54 float DelaySeconds = 0.0f;
55 double EndTime = 0.0;
56};
57
58DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDelayedForLoopOutputPin, int32, Index);
59
60
61UCLASS()
62class CK_UE_API UCK_DelayedForLoopAction : public UBlueprintAsyncActionBase
63{
64 GENERATED_BODY()
65
66public:
67 UPROPERTY(BlueprintAssignable)
68 FDelayedForLoopOutputPin OnLoop;
69
70 UPROPERTY(BlueprintAssignable)
71 FDelayedForLoopOutputPin OnCompleted;
72
78 UFUNCTION(BlueprintCallable, Category = "Utilities|Flow Control", meta = (BlueprintInternalUseOnly = "true", WorldContext = "WorldContextObject"))
79 static UCK_DelayedForLoopAction* DelayedForLoop(UObject* WorldContextObject, int32 Count, float Delay);
80
81 virtual void Activate() override;
82
83private:
84 void ScheduleNext();
85
86private:
87 int32 Count = 0;
88 int32 CurrentIndex = 0;
89 float Delay = 0.f;
90
91private:
92 UPROPERTY(Transient)
93 TWeakObjectPtr<UObject> CachedWorldContext;
94
95 FTSTicker::FDelegateHandle TickerHandle;
96};
97
98
99UCLASS()
100class CK_UE_API UCK_BPFunctionLibrary : public UBlueprintFunctionLibrary
101{
102 GENERATED_BODY()
103
104public:
106 UFUNCTION(BlueprintPure, Category = "GAS|EffectContext")
107 static AActor* GetEffectSourceAvatar(const FGameplayEffectContextHandle& EffectContext);
108
110 UFUNCTION(BlueprintPure, Category = "Utilities", meta = (DisplayName = "Get Object Unique ID"))
111 static int32 GetObjectUniqueID(const UObject* Object);
112
114 UFUNCTION(BlueprintPure, Category = "Utilities", meta = (DisplayName = "Is Game In Progress", WorldContext = "WorldContextObject"))
115 static bool IsGameInProgress(const UObject* WorldContextObject);
116
117
118 UFUNCTION(BlueprintPure, Category = "Utilities", meta = (DisplayName = "PlayerManagement Subsystem", WorldContext = "WorldContextObject"))
119 static UPlayerManagementSubsystem* GetPlayerManagementSubsystem(const UObject* WorldContextObject);
120
121 UFUNCTION(BlueprintPure, Category = "Utilities", meta = (DisplayName = "StageManagement Subsystem", WorldContext = "WorldContextObject"))
122 static UStageSubsystem* GetStageManagementSubsystem(const UObject* WorldContextObject);
123
124 UFUNCTION(BlueprintPure, Category = "Utilities", meta = (DisplayName = "LevelStreaming Subsystem", WorldContext = "WorldContextObject"))
125 static ULevelStreamingSubsystem* GetLevelStreamingSubsystem(const UObject* WorldContextObject);
126
127 UFUNCTION(BlueprintPure, Category = "Utilities", meta = (DisplayName = "UIManagement Subsystem", WorldContext = "WorldContextObject"))
128 static UUIManagementSubsystem* GetUIManagementSubsystem(const UObject* WorldContextObject);
129
130 UFUNCTION(BlueprintPure, Category = "Utilities", meta = (DisplayName = "SituationManagement Subsystem", WorldContext = "WorldContextObject"))
131 static USituationSubsystem* GetSituationManagementSubsystem(const UObject* WorldContextObject);
132
133 UFUNCTION(BlueprintPure, Category = "Utilities", meta = (DisplayName = "Streaming Subsystem", WorldContext = "WorldContextObject"))
134 static UStreamingSubsystem* GetStreamingSubsystem(const UObject* WorldContextObject);
135
136 UFUNCTION(BlueprintCallable, Category = "Utilities", meta = (DisplayName = "Get Pool System", WorldContext = "WorldContextObject"))
137 static UPoolWorldSubsystem* GetPoolWorldSystem(const UObject* WorldContextObject);
138};
139
140
141UCLASS()
142class CK_UE_API UCK_LevelStreamingBPLibrary : public UBlueprintFunctionLibrary
143{
144 GENERATED_BODY()
145
146public:
147 UFUNCTION(BlueprintCallable, Category = "LevelStreaming", meta = (DefaultToSelf = "TargetActor"))
148 static void RequestLevelLoad(const AUStageFlowDefinition* TargetActor, ULevelStreamingData* Data);
149
150 UFUNCTION(BlueprintCallable, Category = "LevelStreaming", meta = (DefaultToSelf = "WorldContext"))
151 static AUStageFlowDefinition* GetCurrentStageFlowDefinition(UWorld* WorldContext);
152
153 UFUNCTION(BlueprintCallable, Category = "LevelStreaming")
154 static UStageDictionary* GetStreamingDataFromStageDictionary();
155
156#if WITH_EDITOR
157 UFUNCTION(BlueprintCallable, Category = "LevelStreaming")
158 static TArray<FString> GetStageEventOptions(const AActor* ContextActor, bool bIncludeAllTag);
159#endif
160
162 UFUNCTION(BlueprintCallable, Category = "LevelStreaming")
163 static TArray<FString> GetStageEventOptionsFromStoryboard(const UStoryboardDefinition* Storyboard, bool bIncludeAllTag);
164};
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FRealTimeDelayCompleted)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDelayedForLoopOutputPin, int32, Index)
Definition StageFlowDefinition.h:27
Definition CK_BPFunctionLibrary.h:101
Definition CK_BPFunctionLibrary.h:63
Definition CK_BPFunctionLibrary.h:143
Definition CK_BPFunctionLibrary.h:29
Definition LevelStreamingData.h:17
Definition LevelStreamingSubsystem.h:38
Definition PlayerManagementSubsystem.h:42
Definition PoolWorldSubsystem.h:28
Definition SituationSubsystem.h:47
Definition StageDictionary.h:14
Definition StageSubsystem.h:102
Definition StoryboardDefinition.h:36
Definition StreamingSubsystem.h:25
Definition UIManagementSubsystem.h:28