Optimize gamemode and gamestate code

This commit is contained in:
martinluckyrobots
2025-04-01 11:04:11 +08:00
parent c35cf74b49
commit 8e1c017515
18 changed files with 234 additions and 18 deletions

View File

@ -7,6 +7,7 @@
#include "SharedDef.h"
#include "LuckyRobotsFunctionLibrary.generated.h"
class ULuckyRobotsGameInstance;
/**
*
*/
@ -15,9 +16,15 @@ class LUCKYROBOTS_API ULuckyRobotsFunctionLibrary : public UBlueprintFunctionLib
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContextObject"))
static ULuckyRobotsGameInstance* GetLuckyRobotsGameInstance(const UObject* WorldContextObject);
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContextObject"))
static TArray<FRobotData> GetActiveRobotDataList(const UObject* WorldContextObject);
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContextObject"))
static TArray<FLevelData> GetActiveLevelDataList(const UObject* WorldContextObject);
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"))
static void UpdateQualitySettings(const UObject* WorldContextObject);
};