2025-03-30 11:46:50 +08:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
|
2025-04-07 10:28:47 +08:00
|
|
|
#include "Core/LuckyRobotsGameInstance.h"
|
|
|
|
#include "GameModes/LuckyRobotsGameState.h"
|
2025-04-03 10:13:55 +08:00
|
|
|
#include "Kismet/GameplayStatics.h"
|
2025-04-07 10:28:47 +08:00
|
|
|
#include "UI/GameUserWidget.h"
|
2025-04-07 11:32:45 +08:00
|
|
|
#include "Kismet/KismetSystemLibrary.h"
|
2025-04-08 22:11:33 +08:00
|
|
|
#include "GameFramework/GameUserSettings.h"
|
|
|
|
#include "Kismet/KismetMathLibrary.h"
|
|
|
|
#include "FunctionLibraries/LuckyRobotsFunctionLibrary.h"
|
2025-04-03 10:13:55 +08:00
|
|
|
|
2025-04-07 11:32:45 +08:00
|
|
|
void ULuckyRobotsGameInstance::DoSendMessage(const FString& SendValue)
|
2025-04-03 10:13:55 +08:00
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
if (ALuckyRobotsGameState* GameState = Cast<ALuckyRobotsGameState>(UGameplayStatics::GetGameState(this)))
|
2025-04-03 10:13:55 +08:00
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
GameState->DoSendMessage(SendValue);
|
2025-04-03 10:13:55 +08:00
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
DoLogItemAdd(TEXT("Receive"), SendValue, ELogItemType::Debug);
|
2025-04-03 10:13:55 +08:00
|
|
|
}
|
|
|
|
|
2025-04-07 11:32:45 +08:00
|
|
|
void ULuckyRobotsGameInstance::DoLogItemAdd(const FString& Topic, const FString& MsgText, ELogItemType LogItemType)
|
2025-04-03 10:13:55 +08:00
|
|
|
{
|
|
|
|
if (GameUserWidget)
|
|
|
|
{
|
2025-04-04 10:21:44 +08:00
|
|
|
GameUserWidget->DoLogItemAdd(Topic, MsgText, LogItemType);
|
2025-04-03 10:13:55 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::SwitchGamePaused()
|
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
bool bPaused = UGameplayStatics::IsGamePaused(this);
|
|
|
|
UGameplayStatics::SetGamePaused(this, !bPaused);
|
2025-04-03 10:13:55 +08:00
|
|
|
|
2025-04-07 11:32:45 +08:00
|
|
|
if (!bPaused)
|
2025-04-03 10:13:55 +08:00
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
UKismetSystemLibrary::ExecuteConsoleCommand(this, TEXT("r.SceneRendering 0"));
|
2025-04-03 10:13:55 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
UKismetSystemLibrary::ExecuteConsoleCommand(this, TEXT("r.SceneRendering 1"));
|
2025-04-03 10:13:55 +08:00
|
|
|
}
|
|
|
|
}
|
2025-03-30 11:46:50 +08:00
|
|
|
|
2025-04-02 13:40:55 +08:00
|
|
|
void ULuckyRobotsGameInstance::ClearTaskList()
|
|
|
|
{
|
|
|
|
TaskList.Empty();
|
|
|
|
}
|
|
|
|
|
2025-04-07 11:32:45 +08:00
|
|
|
void ULuckyRobotsGameInstance::AddTask(const FGoalsTaskData& TaskData)
|
2025-04-02 13:40:55 +08:00
|
|
|
{
|
|
|
|
TaskList.Add(TaskData);
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::RemoveTask(const FGoalsTaskData& TaskData)
|
2025-04-02 13:40:55 +08:00
|
|
|
{
|
|
|
|
TaskList.Remove(TaskData);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::RemoveTaskByGoalType(EGoalType GoalType)
|
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
for (const FGoalsTaskData& Task : TaskList)
|
2025-04-02 13:40:55 +08:00
|
|
|
{
|
|
|
|
if (Task.GoalType == GoalType)
|
|
|
|
{
|
|
|
|
RemoveTask(Task);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-04-07 11:32:45 +08:00
|
|
|
int32 ULuckyRobotsGameInstance::GetTaskNum() const
|
2025-04-02 13:40:55 +08:00
|
|
|
{
|
|
|
|
return TaskList.Num();
|
|
|
|
}
|
|
|
|
|
2025-04-07 11:32:45 +08:00
|
|
|
void ULuckyRobotsGameInstance::SetTask(int32 Index, const FGoalsTaskData& TaskData)
|
2025-04-02 13:40:55 +08:00
|
|
|
{
|
|
|
|
if (TaskList.IsValidIndex(Index))
|
|
|
|
{
|
|
|
|
TaskList[Index] = TaskData;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
while (TaskList.Num() < Index)
|
2025-04-02 13:40:55 +08:00
|
|
|
{
|
|
|
|
FGoalsTaskData TempTaskData;
|
|
|
|
AddTask(TempTaskData);
|
|
|
|
}
|
|
|
|
AddTask(TaskData);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-04-07 11:32:45 +08:00
|
|
|
bool ULuckyRobotsGameInstance::GetTask(int32 Index, FGoalsTaskData& OutTaskData) const
|
2025-04-02 13:40:55 +08:00
|
|
|
{
|
|
|
|
if (TaskList.IsValidIndex(Index))
|
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
OutTaskData = TaskList[Index];
|
2025-04-02 13:40:55 +08:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::ReSetTaskList()
|
|
|
|
{
|
|
|
|
TArray<FGoalsTaskData> TempTaskList;
|
2025-04-07 11:32:45 +08:00
|
|
|
for (FGoalsTaskData& Task : TaskList)
|
2025-04-02 13:40:55 +08:00
|
|
|
{
|
|
|
|
Task.bIsStart = false;
|
2025-04-07 11:32:45 +08:00
|
|
|
Task.bIsComplete = false;
|
2025-04-02 13:40:55 +08:00
|
|
|
Task.bActive = false;
|
|
|
|
TempTaskList.Add(Task);
|
|
|
|
}
|
|
|
|
TaskList = TempTaskList;
|
|
|
|
}
|
|
|
|
|
2025-04-07 11:32:45 +08:00
|
|
|
TArray<FGoalsTaskData> ULuckyRobotsGameInstance::GetTaskList() const
|
2025-04-02 13:40:55 +08:00
|
|
|
{
|
|
|
|
return TaskList;
|
2025-04-03 10:13:55 +08:00
|
|
|
}
|
|
|
|
|
2025-04-07 11:32:45 +08:00
|
|
|
void ULuckyRobotsGameInstance::DoSetTempTaskValueChange(bool bIsClear)
|
2025-04-03 10:13:55 +08:00
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
if (bIsClear)
|
2025-04-03 10:13:55 +08:00
|
|
|
{
|
|
|
|
ClearTaskList();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
AddTask(TempTask);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (GameUserWidget)
|
|
|
|
{
|
|
|
|
GameUserWidget->DoRefreshListView();
|
|
|
|
}
|
|
|
|
}
|
2025-04-04 14:04:15 +08:00
|
|
|
|
2025-04-08 22:11:33 +08:00
|
|
|
void ULuckyRobotsGameInstance::DoResolutionChange(bool bIsFullscreen)
|
|
|
|
{
|
|
|
|
UGameUserSettings* GameUserSettings = UGameUserSettings::GetGameUserSettings();
|
|
|
|
if (!GameUserSettings)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
FIntPoint LastResolution = FIntPoint(1280, 720);
|
|
|
|
if (bIsFullscreen)
|
|
|
|
{
|
|
|
|
TArray<FIntPoint> SupportedResolutions;
|
|
|
|
if (UKismetSystemLibrary::GetSupportedFullscreenResolutions(SupportedResolutions))
|
|
|
|
{
|
|
|
|
if (SupportedResolutions.Num() > 0)
|
|
|
|
{
|
|
|
|
LastResolution = SupportedResolutions.Last();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
FString PlatformName = UGameplayStatics::GetPlatformName();
|
|
|
|
if(PlatformName == "Linux")
|
|
|
|
{
|
|
|
|
LastResolution = FIntPoint(720, 405);
|
|
|
|
}
|
|
|
|
else if (PlatformName == "Mac")
|
|
|
|
{
|
|
|
|
LastResolution = FIntPoint(720, 405);
|
|
|
|
}
|
|
|
|
else if(PlatformName == "Windows")
|
|
|
|
{
|
|
|
|
LastResolution = FIntPoint(1280, 720);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GameUserSettings->SetScreenResolution(LastResolution);
|
|
|
|
GameUserSettings->SetFullscreenMode(bIsFullscreen ? EWindowMode::Fullscreen : EWindowMode::Windowed);
|
|
|
|
GameUserSettings->ApplyResolutionSettings(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
FString ULuckyRobotsGameInstance::DoRandomString(FString StartString)
|
|
|
|
{
|
|
|
|
FString TempString = "";
|
|
|
|
for (int32 Index = 0; Index < 7; Index++)
|
|
|
|
{
|
|
|
|
int32 RandomIndex = UKismetMathLibrary::RandomInteger(AlphabetForRandomList.Num());
|
|
|
|
if (AlphabetForRandomList.IsValidIndex(RandomIndex))
|
|
|
|
{
|
|
|
|
TempString.Append(AlphabetForRandomList[RandomIndex]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return StartString + "#" + TempString;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::UpdateQualitySettings()
|
|
|
|
{
|
|
|
|
if (UGameUserSettings* GameUserSettings = GEngine->GetGameUserSettings())
|
|
|
|
{
|
|
|
|
GameUserSettings->SetOverallScalabilityLevel(static_cast<int32>(CurrentSelectQuality));
|
|
|
|
GameUserSettings->SaveSettings();
|
|
|
|
GameUserSettings->ApplySettings(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::DoQualitySettings(int32 Quality, bool Auto)
|
|
|
|
{
|
|
|
|
if (Auto)
|
|
|
|
{
|
|
|
|
bIsFirstOpenGame = false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
UpdateQualitySettings();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-04-09 13:04:34 +08:00
|
|
|
FString ULuckyRobotsGameInstance::GetWriteFolderPath()
|
|
|
|
{
|
|
|
|
FString Directory = FPaths::ConvertRelativePathToFull(FPaths::ProjectDir());
|
|
|
|
FString WriteFolderPath = FPaths::Combine(Directory, GetCurrentFolderName()) + "/";
|
|
|
|
|
|
|
|
return WriteFolderPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
TSoftObjectPtr<UStaticMesh> ULuckyRobotsGameInstance::GetRandomMesh()
|
|
|
|
{
|
|
|
|
int32 MeshCount = GetCurrentRandomMeshes().Num();
|
|
|
|
if (MeshCount > 0)
|
|
|
|
{
|
|
|
|
int32 RandomIndex = UKismetMathLibrary::RandomIntegerInRange(0, MeshCount - 1);
|
|
|
|
if (GetCurrentRandomMeshes().IsValidIndex(RandomIndex))
|
|
|
|
{
|
|
|
|
return GetCurrentRandomMeshes()[RandomIndex];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
TArray<FSelectableItemData> ULuckyRobotsGameInstance::GetSelectableItemList(EItemCategory ItemCategory)
|
|
|
|
{
|
|
|
|
TArray<FSelectableItemData> SelectableItemList;
|
|
|
|
UDataTable* SelectedDataTable = nullptr;
|
|
|
|
|
|
|
|
switch (ItemCategory)
|
|
|
|
{
|
|
|
|
case EItemCategory::Furniture:
|
|
|
|
SelectedDataTable = FurnitureDataTable;
|
|
|
|
break;
|
|
|
|
case EItemCategory::Decoration:
|
|
|
|
SelectedDataTable = DecorationDataTable;
|
|
|
|
break;
|
|
|
|
case EItemCategory::Kitchenware:
|
|
|
|
SelectedDataTable = KitchenwareDataTable;
|
|
|
|
break;
|
|
|
|
case EItemCategory::Electronics:
|
|
|
|
SelectedDataTable = ElectronicsDataTable;
|
|
|
|
break;
|
|
|
|
case EItemCategory::Bathroom:
|
|
|
|
SelectedDataTable = BathroomDataTable;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (SelectedDataTable)
|
|
|
|
{
|
|
|
|
FString ContextString;
|
|
|
|
TArray<FName> RowNames = SelectedDataTable->GetRowNames();
|
|
|
|
for (const FName& RowName : RowNames)
|
|
|
|
{
|
|
|
|
FSelectableItemData* ItemData = SelectedDataTable->FindRow<FSelectableItemData>(RowName, ContextString);
|
|
|
|
if (ItemData)
|
|
|
|
{
|
|
|
|
if (ItemData->Category == ItemCategory && UKismetSystemLibrary::IsValidSoftObjectReference(ItemData->Mesh))
|
|
|
|
{
|
|
|
|
SelectableItemList.Add(*ItemData);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return SelectableItemList;
|
|
|
|
}
|
|
|
|
|
2025-04-07 11:32:45 +08:00
|
|
|
void ULuckyRobotsGameInstance::SetCurrentFolderName(const FString& FolderName)
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.FolderName = FText::FromString(FolderName);
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::SetCurrentFileName(const FString& FileName)
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.FileName = FText::FromString(FileName);
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::SetCurrentWritesPerSec(int32 WritesPerSec)
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.WritesPerSec = FText::FromString(FString::FromInt(WritesPerSec));
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
2025-04-04 14:04:15 +08:00
|
|
|
void ULuckyRobotsGameInstance::SetCurrentIsScenario(bool IsScenario)
|
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.IsScenario = IsScenario;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
2025-04-04 14:04:15 +08:00
|
|
|
void ULuckyRobotsGameInstance::SetCurrentIsRandomLight(bool bLight)
|
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.bLight = bLight;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
2025-04-04 14:04:15 +08:00
|
|
|
void ULuckyRobotsGameInstance::SetCurrentIsRandomMaterials(bool bMaterials)
|
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.bMaterials = bMaterials;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
2025-04-04 14:04:15 +08:00
|
|
|
void ULuckyRobotsGameInstance::SetCurrentIsRandomRobotPosition(bool bRobotPosition)
|
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.bRobotPosition = bRobotPosition;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
2025-04-04 14:04:15 +08:00
|
|
|
void ULuckyRobotsGameInstance::SetCurrentIsRandomPets(bool bPets)
|
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.bPets = bPets;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::SetCurrentPetsNumber(int32 PetsNumber)
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.NumberOfPets = FText::FromString(FString::FromInt(PetsNumber));
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
2025-04-04 14:04:15 +08:00
|
|
|
void ULuckyRobotsGameInstance::SetCurrentIsRandomPeople(bool bPeople)
|
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.bPeople = bPeople;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::SetCurrentPeopleNumber(int32 PeopleNumber)
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.NumberOfPeople = FText::FromString(FString::FromInt(PeopleNumber));
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
2025-04-04 14:04:15 +08:00
|
|
|
void ULuckyRobotsGameInstance::SetCurrentIsRandomObjects(bool bObjects)
|
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.bObjects = bObjects;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::SetCurrentObjectsNumber(int32 ObjectsNumber)
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.NumberOfObjects = FText::FromString(FString::FromInt(ObjectsNumber));
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
2025-04-07 15:10:43 +08:00
|
|
|
void ULuckyRobotsGameInstance::SetCurrentRandomMeshes(const TArray<TSoftObjectPtr<UStaticMesh>>& RandomMeshes)
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.RandomMeshes = RandomMeshes;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
2025-04-04 14:04:15 +08:00
|
|
|
void ULuckyRobotsGameInstance::SetCurrentIsInfiniteCapture(bool bInfiniteCapture)
|
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.bInfiniteCapture = bInfiniteCapture;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::SetCurrentCaptureNumber(int32 CaptureNumber)
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
CurrentCaptureSettingsData.NumberOfCaptures = FText::FromString(FString::FromInt(CaptureNumber));
|
|
|
|
}
|
|
|
|
|
2025-04-07 11:32:45 +08:00
|
|
|
FString ULuckyRobotsGameInstance::GetCurrentFolderName() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
return CurrentCaptureSettingsData.FolderName.ToString();
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
FString ULuckyRobotsGameInstance::GetCurrentFileName() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
return CurrentCaptureSettingsData.FileName.ToString();
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
int32 ULuckyRobotsGameInstance::GetCurrentWritesPerSec() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
return FCString::Atoi(*CurrentCaptureSettingsData.WritesPerSec.ToString());
|
2025-04-04 14:04:15 +08:00
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
bool ULuckyRobotsGameInstance::GetCurrentIsScenario() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
return CurrentCaptureSettingsData.IsScenario;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
bool ULuckyRobotsGameInstance::GetCurrentIsRandomLight() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
return CurrentCaptureSettingsData.bLight;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
bool ULuckyRobotsGameInstance::GetCurrentIsRandomMaterials() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
return CurrentCaptureSettingsData.bMaterials;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
bool ULuckyRobotsGameInstance::GetCurrentIsRandomRobotPosition() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
return CurrentCaptureSettingsData.bRobotPosition;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
bool ULuckyRobotsGameInstance::GetCurrentIsRandomPets() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
return CurrentCaptureSettingsData.bPets;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
int32 ULuckyRobotsGameInstance::GetCurrentPetsNumber() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
return FCString::Atoi(*CurrentCaptureSettingsData.NumberOfPets.ToString());
|
2025-04-04 14:04:15 +08:00
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
bool ULuckyRobotsGameInstance::GetCurrentIsRandomPeople() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
return CurrentCaptureSettingsData.bPeople;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
int32 ULuckyRobotsGameInstance::GetCurrentPeopleNumber() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
return FCString::Atoi(*CurrentCaptureSettingsData.NumberOfPeople.ToString());
|
2025-04-04 14:04:15 +08:00
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
bool ULuckyRobotsGameInstance::GetCurrentIsRandomObjects() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
return CurrentCaptureSettingsData.bObjects;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
int32 ULuckyRobotsGameInstance::GetCurrentObjectsNumber() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
return FCString::Atoi(*CurrentCaptureSettingsData.NumberOfObjects.ToString());
|
2025-04-04 14:04:15 +08:00
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
2025-04-07 15:10:43 +08:00
|
|
|
TArray<TSoftObjectPtr<UStaticMesh>> ULuckyRobotsGameInstance::GetCurrentRandomMeshes() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
return CurrentCaptureSettingsData.RandomMeshes;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
bool ULuckyRobotsGameInstance::GetCurrentIsInfiniteCapture() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
|
|
|
return CurrentCaptureSettingsData.bInfiniteCapture;
|
|
|
|
}
|
2025-04-07 11:32:45 +08:00
|
|
|
|
|
|
|
int32 ULuckyRobotsGameInstance::GetCurrentCaptureNumber() const
|
2025-04-04 14:04:15 +08:00
|
|
|
{
|
2025-04-07 11:32:45 +08:00
|
|
|
return FCString::Atoi(*CurrentCaptureSettingsData.NumberOfCaptures.ToString());
|
|
|
|
}
|
2025-04-08 22:11:33 +08:00
|
|
|
|
|
|
|
void ULuckyRobotsGameInstance::SetWidgetTotalHit(int32 Value)
|
|
|
|
{
|
|
|
|
WidgetTotalHit = Value;
|
|
|
|
}
|
|
|
|
|
|
|
|
int32 ULuckyRobotsGameInstance::GetWidgetTotalHit() const
|
|
|
|
{
|
|
|
|
return WidgetTotalHit;
|
|
|
|
}
|