Compare commits

..

No commits in common. "73fb958f07fd44cf20662889b4c883a2137884bc" and "2cb4d5604456092ebfd38886c44bce4ad231180e" have entirely different histories.

12 changed files with 26 additions and 26 deletions

View File

@ -1,5 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings. // Fill out your copyright notice in the Description page of Project Settings.
#include "LuckyRobotsGameInstance.h" #include "LuckyrobotsGameInstance.h"

View File

@ -1,5 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings. // Fill out your copyright notice in the Description page of Project Settings.
#include "LuckyRobotsGameMode.h" #include "LuckyrobotsGameMode.h"

View File

@ -1,5 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings. // Fill out your copyright notice in the Description page of Project Settings.
#include "LuckyRobotsGameState.h" #include "LuckyrobotsGameState.h"

View File

@ -1,5 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings. // Fill out your copyright notice in the Description page of Project Settings.
#include "LuckyRobotsPlayerController.h" #include "LuckyrobotsPlayerController.h"

View File

@ -3,7 +3,7 @@
#include "MainScreenUserWidget.h" #include "MainScreenUserWidget.h"
#include "Engine/DataTable.h" #include "Engine/DataTable.h"
#include "LuckyRobotsGameInstance.h" #include "LuckyrobotsGameInstance.h"
void UMainScreenUserWidget::NativeConstruct() void UMainScreenUserWidget::NativeConstruct()
{ {
@ -17,13 +17,13 @@ void UMainScreenUserWidget::InitData()
InitRobotData(); InitRobotData();
InitLevelData(); InitLevelData();
ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast<ULuckyRobotsGameInstance>(GetGameInstance()); ULuckyrobotsGameInstance* LuckyrobotsGameInstance = Cast<ULuckyrobotsGameInstance>(GetGameInstance());
if (LuckyRobotsGameInstance) if (LuckyrobotsGameInstance)
{ {
UEnum* QualityEnum = StaticEnum<EQualityEnum>(); UEnum* QualityEnum = StaticEnum<EQualityEnum>();
for (int32 i = 0; i < QualityEnum->NumEnums() - 1; i++) for (int32 i = 0; i < QualityEnum->NumEnums() - 1; i++)
{ {
if (EQualityEnum(QualityEnum->GetValueByIndex(i)) == LuckyRobotsGameInstance->CurrentSelectQuality) if (EQualityEnum(QualityEnum->GetValueByIndex(i)) == LuckyrobotsGameInstance->CurrentSelectQuality)
{ {
iCurrentSelectRobot = i; iCurrentSelectRobot = i;
break; break;
@ -174,31 +174,31 @@ void UMainScreenUserWidget::SelectPreviousQuality()
void UMainScreenUserWidget::UpdateSelectRobot() void UMainScreenUserWidget::UpdateSelectRobot()
{ {
ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast<ULuckyRobotsGameInstance>(GetGameInstance()); ULuckyrobotsGameInstance* LuckyrobotsGameInstance = Cast<ULuckyrobotsGameInstance>(GetGameInstance());
if (LuckyRobotsGameInstance) if (LuckyrobotsGameInstance)
{ {
LuckyRobotsGameInstance->CurrentSelectRobot = GetCurrentRobotData().Name; LuckyrobotsGameInstance->CurrentSelectRobot = GetCurrentRobotData().Name;
} }
BPUpdateSelectRobot(); BPUpdateSelectRobot();
InitLevelData(); InitLevelData();
} }
void UMainScreenUserWidget::UpdateSelectLevel() void UMainScreenUserWidget::UpdateSelectLevel()
{ {
ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast<ULuckyRobotsGameInstance>(GetGameInstance()); ULuckyrobotsGameInstance* LuckyrobotsGameInstance = Cast<ULuckyrobotsGameInstance>(GetGameInstance());
if (LuckyRobotsGameInstance) if (LuckyrobotsGameInstance)
{ {
LuckyRobotsGameInstance->CurrentSelectLevel = GetCurrentLevelData().LevelEnum; LuckyrobotsGameInstance->CurrentSelectLevel = GetCurrentLevelData().LevelEnum;
} }
BPUpdateSelectLevel(); BPUpdateSelectLevel();
} }
void UMainScreenUserWidget::UpdateSelectQuality() void UMainScreenUserWidget::UpdateSelectQuality()
{ {
ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast<ULuckyRobotsGameInstance>(GetGameInstance()); ULuckyrobotsGameInstance* LuckyrobotsGameInstance = Cast<ULuckyrobotsGameInstance>(GetGameInstance());
if (LuckyRobotsGameInstance) if (LuckyrobotsGameInstance)
{ {
UEnum* QualityEnum = StaticEnum<EQualityEnum>(); UEnum* QualityEnum = StaticEnum<EQualityEnum>();
LuckyRobotsGameInstance->CurrentSelectQuality = EQualityEnum(QualityEnum->GetValueByIndex(iCurrentSelectQuality)); LuckyrobotsGameInstance->CurrentSelectQuality = EQualityEnum(QualityEnum->GetValueByIndex(iCurrentSelectQuality));
} }
BPUpdateSelectQuality(); BPUpdateSelectQuality();
} }

View File

@ -5,13 +5,13 @@
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "Engine/GameInstance.h" #include "Engine/GameInstance.h"
#include "SharedDef.h" #include "SharedDef.h"
#include "LuckyRobotsGameInstance.generated.h" #include "LuckyrobotsGameInstance.generated.h"
/** /**
* *
*/ */
UCLASS() UCLASS()
class LUCKYROBOTS_API ULuckyRobotsGameInstance : public UGameInstance class LUCKYROBOTS_API ULuckyrobotsGameInstance : public UGameInstance
{ {
GENERATED_BODY() GENERATED_BODY()

View File

@ -4,13 +4,13 @@
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h" #include "GameFramework/GameModeBase.h"
#include "LuckyRobotsGameMode.generated.h" #include "LuckyrobotsGameMode.generated.h"
/** /**
* *
*/ */
UCLASS() UCLASS()
class LUCKYROBOTS_API ALuckyRobotsGameMode : public AGameModeBase class LUCKYROBOTS_API ALuckyrobotsGameMode : public AGameModeBase
{ {
GENERATED_BODY() GENERATED_BODY()

View File

@ -4,13 +4,13 @@
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "GameFramework/GameStateBase.h" #include "GameFramework/GameStateBase.h"
#include "LuckyRobotsGameState.generated.h" #include "LuckyrobotsGameState.generated.h"
/** /**
* *
*/ */
UCLASS() UCLASS()
class LUCKYROBOTS_API ALuckyRobotsGameState : public AGameStateBase class LUCKYROBOTS_API ALuckyrobotsGameState : public AGameStateBase
{ {
GENERATED_BODY() GENERATED_BODY()

View File

@ -4,13 +4,13 @@
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "GameFramework/PlayerController.h" #include "GameFramework/PlayerController.h"
#include "LuckyRobotsPlayerController.generated.h" #include "LuckyrobotsPlayerController.generated.h"
/** /**
* *
*/ */
UCLASS() UCLASS()
class LUCKYROBOTS_API ALuckyRobotsPlayerController : public APlayerController class LUCKYROBOTS_API ALuckyrobotsPlayerController : public APlayerController
{ {
GENERATED_BODY() GENERATED_BODY()

View File

@ -113,7 +113,7 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite) UPROPERTY(EditAnywhere, BlueprintReadWrite)
TSoftObjectPtr<UWorld> LevelObject; FString LevelName;
UPROPERTY(EditAnywhere, BlueprintReadWrite) UPROPERTY(EditAnywhere, BlueprintReadWrite)
UTexture2D* LevelImage; UTexture2D* LevelImage;