LuckyWorldV2/Source/Luckyrobots/Public/Core/LuckyRobotsGameInstance.h

233 lines
5.8 KiB
C
Raw Normal View History

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()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
UDataTable* RobotDataDataTable;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
UDataTable* LevelDataTable;
public:
bool bIsFirstOpenGame;
bool bIsDebug;
bool bIsWidgetTestMode;
bool bIsShowPath;
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;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
2025-04-07 11:32:45 +08:00
int32 FolderCount;
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;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<FGoalsTaskData> TaskList;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FGoalsTaskData TempTask;
2025-04-03 10:13:55 +08:00
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UGameUserWidget* GameUserWidget;
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-03 10:13:55 +08:00
public:
UFUNCTION(BlueprintCallable)
void ClearTaskList();
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
void AddTask(const FGoalsTaskData& TaskData);
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
void RemoveTask(const FGoalsTaskData& TaskData);
UFUNCTION(BlueprintCallable)
void RemoveTaskByGoalType(EGoalType GoalType);
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
int32 GetTaskNum() const;
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
void SetTask(int32 Index, const FGoalsTaskData& TaskData);
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
bool GetTask(int32 Index, FGoalsTaskData& OutTaskData) const;
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
public:
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
void SetCurrentFolderName(const FString& FolderName);
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
void SetCurrentFileName(const FString& FileName);
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
void SetCurrentWritesPerSec(int32 WritesPerSec);
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);
UFUNCTION(BlueprintCallable)
void SetCurrentIsRandomPeople(bool bPeople);
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
void SetCurrentPeopleNumber(int32 PeopleNumber);
UFUNCTION(BlueprintCallable)
void SetCurrentIsRandomObjects(bool bObjects);
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
void SetCurrentObjectsNumber(int32 ObjectsNumber);
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
void SetCurrentRandomMeshes(const TArray<TSoftObjectPtr<UStaticMeshComponent>>& RandomMeshes);
UFUNCTION(BlueprintCallable)
void SetCurrentIsInfiniteCapture(bool bInfiniteCapture);
UFUNCTION(BlueprintCallable)
2025-04-07 11:32:45 +08:00
void SetCurrentCaptureNumber(int32 CaptureNumber);
public:
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
FString GetCurrentFolderName() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
FString GetCurrentFileName() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
int32 GetCurrentWritesPerSec() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
bool GetCurrentIsScenario() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
bool GetCurrentIsRandomLight() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
bool GetCurrentIsRandomMaterials() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
bool GetCurrentIsRandomRobotPosition() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
bool GetCurrentIsRandomPets() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
int32 GetCurrentPetsNumber() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
bool GetCurrentIsRandomPeople() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
int32 GetCurrentPeopleNumber() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
bool GetCurrentIsRandomObjects() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
int32 GetCurrentObjectsNumber() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
TArray<TSoftObjectPtr<UStaticMeshComponent>> GetCurrentRandomMeshes() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
bool GetCurrentIsInfiniteCapture() const;
UFUNCTION(BlueprintPure)
2025-04-07 11:32:45 +08:00
int32 GetCurrentCaptureNumber() 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
};