2025-03-30 11:46:50 +08:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
#include "Engine/GameInstance.h"
|
|
|
|
#include "SharedDef.h"
|
|
|
|
#include "LuckyRobotsGameInstance.generated.h"
|
|
|
|
|
2025-04-01 11:04:11 +08:00
|
|
|
class USIOJsonValue;
|
2025-04-03 10:13:55 +08:00
|
|
|
class UGameUserWidget;
|
2025-03-30 11:46:50 +08:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
UCLASS()
|
|
|
|
class LUCKYROBOTS_API ULuckyRobotsGameInstance : public UGameInstance
|
|
|
|
{
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
2025-03-31 14:59:07 +08:00
|
|
|
public:
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
|
|
|
UDataTable* RobotDataDataTable;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
|
|
|
UDataTable* LevelDataTable;
|
|
|
|
|
2025-04-07 15:10:43 +08:00
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
|
|
|
UDataTable* FurnitureDataTable;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
|
|
|
UDataTable* DecorationDataTable;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
|
|
|
UDataTable* KitchenwareDataTable;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
|
|
|
UDataTable* ElectronicsDataTable;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
|
|
|
UDataTable* BathroomDataTable;
|
|
|
|
|
2025-04-04 14:04:15 +08:00
|
|
|
public:
|
2025-04-08 22:11:33 +08:00
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
|
|
|
TArray<FString> AlphabetForRandomList;
|
|
|
|
|
|
|
|
public:
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Resulation")
|
2025-04-04 14:04:15 +08:00
|
|
|
bool bIsFirstOpenGame;
|
2025-04-08 22:11:33 +08:00
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "WebSocket")
|
|
|
|
bool bIsStartConnect;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
|
|
ESaveDataType SelectSaveDataType;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
2025-04-04 14:04:15 +08:00
|
|
|
bool bIsDebug;
|
2025-04-08 22:11:33 +08:00
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
2025-04-04 14:04:15 +08:00
|
|
|
bool bIsWidgetTestMode;
|
2025-04-08 22:11:33 +08:00
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
2025-04-04 14:04:15 +08:00
|
|
|
bool bIsShowPath;
|
|
|
|
|
2025-04-08 22:11:33 +08:00
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
|
|
int32 WidgetTotalHit;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
|
|
bool bInfiniteTime;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
|
|
float FastEndTaskTime = 180.0f;
|
|
|
|
|
2025-04-04 14:04:15 +08:00
|
|
|
public:
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
|
|
|
bool bIsCapture;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
|
|
|
bool bIsCaptureHand;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
|
|
|
bool bIsCaptureHead;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
|
|
|
bool bScenarioCapture;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
|
|
|
bool bIsMouseOpen;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
2025-04-07 11:32:45 +08:00
|
|
|
bool bIsChanged;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
2025-04-07 11:32:45 +08:00
|
|
|
int32 FolderCount;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
|
|
|
FTransform TargetPosition;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
|
|
|
FCaptureSettingsData CurrentCaptureSettingsData;
|
|
|
|
|
2025-04-05 13:32:00 +08:00
|
|
|
public:
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Random Mesh")
|
|
|
|
bool bIsRandomPannel;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Random Mesh")
|
|
|
|
bool bIsRandomRobotPosition;
|
|
|
|
|
2025-03-30 11:46:50 +08:00
|
|
|
public:
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
2025-04-01 11:04:11 +08:00
|
|
|
ERobotsName CurrentSelectRobot = ERobotsName::None;
|
2025-03-30 11:46:50 +08:00
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
2025-04-01 11:04:11 +08:00
|
|
|
ELevelEnum CurrentSelectLevel = ELevelEnum::None;
|
2025-03-30 11:46:50 +08:00
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
2025-04-01 11:04:11 +08:00
|
|
|
EQualityEnum CurrentSelectQuality = EQualityEnum::Epic;
|
2025-03-31 14:59:07 +08:00
|
|
|
|
2025-04-02 13:40:55 +08:00
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
|
|
TArray<FGoalsTaskData> TaskList;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
|
|
FGoalsTaskData TempTask;
|
|
|
|
|
2025-04-03 10:13:55 +08:00
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
|
|
UGameUserWidget* GameUserWidget;
|
|
|
|
|
2025-04-03 12:29:12 +08:00
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
|
|
TArray<FLuckyCode> LuckyCodeList;
|
|
|
|
|
2025-04-01 11:04:11 +08:00
|
|
|
public:
|
2025-04-03 10:13:55 +08:00
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void DoSendMessage(const FString& SendValue);
|
2025-04-03 10:13:55 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void DoLogItemAdd(const FString& Topic, const FString& MsgText, ELogItemType LogItemType);
|
2025-04-03 10:13:55 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void SwitchGamePaused();
|
2025-04-02 13:40:55 +08:00
|
|
|
|
2025-04-03 10:13:55 +08:00
|
|
|
public:
|
2025-04-02 13:40:55 +08:00
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void ClearTaskList();
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void AddTask(const FGoalsTaskData& TaskData);
|
2025-04-02 13:40:55 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void RemoveTask(const FGoalsTaskData& TaskData);
|
2025-04-02 13:40:55 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void RemoveTaskByGoalType(EGoalType GoalType);
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
int32 GetTaskNum() const;
|
2025-04-02 13:40:55 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void SetTask(int32 Index, const FGoalsTaskData& TaskData);
|
2025-04-02 13:40:55 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
bool GetTask(int32 Index, FGoalsTaskData& OutTaskData) const;
|
2025-04-02 13:40:55 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void ReSetTaskList();
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
TArray<FGoalsTaskData> GetTaskList() const;
|
2025-04-03 10:13:55 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void DoSetTempTaskValueChange(bool bIsClear);
|
2025-04-03 10:13:55 +08:00
|
|
|
|
2025-04-08 22:11:33 +08:00
|
|
|
UFUNCTION(BlueprintCallable, Category = "Resolution")
|
|
|
|
void DoResolutionChange(bool bIsFullscreen);
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
FString DoRandomString(FString StartString);
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void UpdateQualitySettings();
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void DoQualitySettings(int32 Quality, bool Auto);
|
2025-04-04 14:04:15 +08:00
|
|
|
public:
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void SetCurrentFolderName(const FString& FolderName);
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void SetCurrentFileName(const FString& FileName);
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void SetCurrentWritesPerSec(int32 WritesPerSec);
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void SetCurrentIsScenario(bool IsScenario);
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void SetCurrentIsRandomLight(bool bLight);
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void SetCurrentIsRandomMaterials(bool bMaterials);
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void SetCurrentIsRandomRobotPosition(bool bRobotPosition);
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void SetCurrentIsRandomPets(bool bPets);
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void SetCurrentPetsNumber(int32 PetsNumber);
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void SetCurrentIsRandomPeople(bool bPeople);
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void SetCurrentPeopleNumber(int32 PeopleNumber);
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void SetCurrentIsRandomObjects(bool bObjects);
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void SetCurrentObjectsNumber(int32 ObjectsNumber);
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 15:10:43 +08:00
|
|
|
void SetCurrentRandomMeshes(const TArray<TSoftObjectPtr<UStaticMesh>>& RandomMeshes);
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void SetCurrentIsInfiniteCapture(bool bInfiniteCapture);
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
2025-04-07 11:32:45 +08:00
|
|
|
void SetCurrentCaptureNumber(int32 CaptureNumber);
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
public:
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
FString GetCurrentFolderName() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
FString GetCurrentFileName() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
int32 GetCurrentWritesPerSec() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
bool GetCurrentIsScenario() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
bool GetCurrentIsRandomLight() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
bool GetCurrentIsRandomMaterials() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
bool GetCurrentIsRandomRobotPosition() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
bool GetCurrentIsRandomPets() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
int32 GetCurrentPetsNumber() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
bool GetCurrentIsRandomPeople() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
int32 GetCurrentPeopleNumber() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
bool GetCurrentIsRandomObjects() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
int32 GetCurrentObjectsNumber() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 15:10:43 +08:00
|
|
|
TArray<TSoftObjectPtr<UStaticMesh>> GetCurrentRandomMeshes() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
bool GetCurrentIsInfiniteCapture() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
2025-04-07 11:32:45 +08:00
|
|
|
int32 GetCurrentCaptureNumber() const;
|
2025-04-04 14:04:15 +08:00
|
|
|
|
2025-04-08 22:11:33 +08:00
|
|
|
public:
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
void SetWidgetTotalHit(int32 Value);
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintPure)
|
|
|
|
int32 GetWidgetTotalHit() const;
|
|
|
|
|
2025-04-03 10:13:55 +08:00
|
|
|
public:
|
|
|
|
UFUNCTION(BlueprintImplementableEvent)
|
|
|
|
void DoGetDispatch(const FString& EventName, USIOJsonValue* EventData);
|
2025-03-30 11:46:50 +08:00
|
|
|
};
|