diff --git a/Content/GameBP/Datatable/DT_LevelData.uasset b/Content/GameBP/Datatable/DT_LevelData.uasset index dd5bb968..c6cc3239 100644 Binary files a/Content/GameBP/Datatable/DT_LevelData.uasset and b/Content/GameBP/Datatable/DT_LevelData.uasset differ diff --git a/Content/luckyBot/Luckywidget/WB_MainScreen.uasset b/Content/luckyBot/Luckywidget/WB_MainScreen.uasset index 68ff9691..28be5a37 100644 Binary files a/Content/luckyBot/Luckywidget/WB_MainScreen.uasset and b/Content/luckyBot/Luckywidget/WB_MainScreen.uasset differ diff --git a/Source/Luckyrobots/Private/LuckyrobotsGameInstance.cpp b/Source/Luckyrobots/Private/LuckyRobotsGameInstance.cpp similarity index 68% rename from Source/Luckyrobots/Private/LuckyrobotsGameInstance.cpp rename to Source/Luckyrobots/Private/LuckyRobotsGameInstance.cpp index 6e26a695..78d52314 100644 --- a/Source/Luckyrobots/Private/LuckyrobotsGameInstance.cpp +++ b/Source/Luckyrobots/Private/LuckyRobotsGameInstance.cpp @@ -1,5 +1,5 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "LuckyrobotsGameInstance.h" +#include "LuckyRobotsGameInstance.h" diff --git a/Source/Luckyrobots/Private/LuckyrobotsGameMode.cpp b/Source/Luckyrobots/Private/LuckyRobotsGameMode.cpp similarity index 71% rename from Source/Luckyrobots/Private/LuckyrobotsGameMode.cpp rename to Source/Luckyrobots/Private/LuckyRobotsGameMode.cpp index c63ae175..4eea9db1 100644 --- a/Source/Luckyrobots/Private/LuckyrobotsGameMode.cpp +++ b/Source/Luckyrobots/Private/LuckyRobotsGameMode.cpp @@ -1,5 +1,5 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "LuckyrobotsGameMode.h" +#include "LuckyRobotsGameMode.h" diff --git a/Source/Luckyrobots/Private/LuckyrobotsGameState.cpp b/Source/Luckyrobots/Private/LuckyRobotsGameState.cpp similarity index 70% rename from Source/Luckyrobots/Private/LuckyrobotsGameState.cpp rename to Source/Luckyrobots/Private/LuckyRobotsGameState.cpp index 331af16a..4f88339c 100644 --- a/Source/Luckyrobots/Private/LuckyrobotsGameState.cpp +++ b/Source/Luckyrobots/Private/LuckyRobotsGameState.cpp @@ -1,5 +1,5 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "LuckyrobotsGameState.h" +#include "LuckyRobotsGameState.h" diff --git a/Source/Luckyrobots/Private/LuckyrobotsPlayerController.cpp b/Source/Luckyrobots/Private/LuckyRobotsPlayerController.cpp similarity index 66% rename from Source/Luckyrobots/Private/LuckyrobotsPlayerController.cpp rename to Source/Luckyrobots/Private/LuckyRobotsPlayerController.cpp index e175d0ee..0519d757 100644 --- a/Source/Luckyrobots/Private/LuckyrobotsPlayerController.cpp +++ b/Source/Luckyrobots/Private/LuckyRobotsPlayerController.cpp @@ -1,5 +1,5 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "LuckyrobotsPlayerController.h" +#include "LuckyRobotsPlayerController.h" diff --git a/Source/Luckyrobots/Private/MainScreenUserWidget.cpp b/Source/Luckyrobots/Private/MainScreenUserWidget.cpp index 8d238ccf..93ca25e8 100644 --- a/Source/Luckyrobots/Private/MainScreenUserWidget.cpp +++ b/Source/Luckyrobots/Private/MainScreenUserWidget.cpp @@ -3,7 +3,7 @@ #include "MainScreenUserWidget.h" #include "Engine/DataTable.h" -#include "LuckyrobotsGameInstance.h" +#include "LuckyRobotsGameInstance.h" void UMainScreenUserWidget::NativeConstruct() { @@ -17,13 +17,13 @@ void UMainScreenUserWidget::InitData() InitRobotData(); InitLevelData(); - ULuckyrobotsGameInstance* LuckyrobotsGameInstance = Cast(GetGameInstance()); - if (LuckyrobotsGameInstance) + ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast(GetGameInstance()); + if (LuckyRobotsGameInstance) { UEnum* QualityEnum = StaticEnum(); 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; break; @@ -174,31 +174,31 @@ void UMainScreenUserWidget::SelectPreviousQuality() void UMainScreenUserWidget::UpdateSelectRobot() { - ULuckyrobotsGameInstance* LuckyrobotsGameInstance = Cast(GetGameInstance()); - if (LuckyrobotsGameInstance) + ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast(GetGameInstance()); + if (LuckyRobotsGameInstance) { - LuckyrobotsGameInstance->CurrentSelectRobot = GetCurrentRobotData().Name; + LuckyRobotsGameInstance->CurrentSelectRobot = GetCurrentRobotData().Name; } BPUpdateSelectRobot(); InitLevelData(); } void UMainScreenUserWidget::UpdateSelectLevel() { - ULuckyrobotsGameInstance* LuckyrobotsGameInstance = Cast(GetGameInstance()); - if (LuckyrobotsGameInstance) + ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast(GetGameInstance()); + if (LuckyRobotsGameInstance) { - LuckyrobotsGameInstance->CurrentSelectLevel = GetCurrentLevelData().LevelEnum; + LuckyRobotsGameInstance->CurrentSelectLevel = GetCurrentLevelData().LevelEnum; } BPUpdateSelectLevel(); } void UMainScreenUserWidget::UpdateSelectQuality() { - ULuckyrobotsGameInstance* LuckyrobotsGameInstance = Cast(GetGameInstance()); - if (LuckyrobotsGameInstance) + ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast(GetGameInstance()); + if (LuckyRobotsGameInstance) { UEnum* QualityEnum = StaticEnum(); - LuckyrobotsGameInstance->CurrentSelectQuality = EQualityEnum(QualityEnum->GetValueByIndex(iCurrentSelectQuality)); + LuckyRobotsGameInstance->CurrentSelectQuality = EQualityEnum(QualityEnum->GetValueByIndex(iCurrentSelectQuality)); } BPUpdateSelectQuality(); } \ No newline at end of file diff --git a/Source/Luckyrobots/Public/LuckyrobotsGameInstance.h b/Source/Luckyrobots/Public/LuckyRobotsGameInstance.h similarity index 80% rename from Source/Luckyrobots/Public/LuckyrobotsGameInstance.h rename to Source/Luckyrobots/Public/LuckyRobotsGameInstance.h index 370a774e..f1c48776 100644 --- a/Source/Luckyrobots/Public/LuckyrobotsGameInstance.h +++ b/Source/Luckyrobots/Public/LuckyRobotsGameInstance.h @@ -5,13 +5,13 @@ #include "CoreMinimal.h" #include "Engine/GameInstance.h" #include "SharedDef.h" -#include "LuckyrobotsGameInstance.generated.h" +#include "LuckyRobotsGameInstance.generated.h" /** * */ UCLASS() -class LUCKYROBOTS_API ULuckyrobotsGameInstance : public UGameInstance +class LUCKYROBOTS_API ULuckyRobotsGameInstance : public UGameInstance { GENERATED_BODY() diff --git a/Source/Luckyrobots/Public/LuckyrobotsGameMode.h b/Source/Luckyrobots/Public/LuckyRobotsGameMode.h similarity index 66% rename from Source/Luckyrobots/Public/LuckyrobotsGameMode.h rename to Source/Luckyrobots/Public/LuckyRobotsGameMode.h index 917ba710..d36ec760 100644 --- a/Source/Luckyrobots/Public/LuckyrobotsGameMode.h +++ b/Source/Luckyrobots/Public/LuckyRobotsGameMode.h @@ -4,13 +4,13 @@ #include "CoreMinimal.h" #include "GameFramework/GameModeBase.h" -#include "LuckyrobotsGameMode.generated.h" +#include "LuckyRobotsGameMode.generated.h" /** * */ UCLASS() -class LUCKYROBOTS_API ALuckyrobotsGameMode : public AGameModeBase +class LUCKYROBOTS_API ALuckyRobotsGameMode : public AGameModeBase { GENERATED_BODY() diff --git a/Source/Luckyrobots/Public/LuckyrobotsGameState.h b/Source/Luckyrobots/Public/LuckyRobotsGameState.h similarity index 66% rename from Source/Luckyrobots/Public/LuckyrobotsGameState.h rename to Source/Luckyrobots/Public/LuckyRobotsGameState.h index 0a8fbbd7..4e64ee0b 100644 --- a/Source/Luckyrobots/Public/LuckyrobotsGameState.h +++ b/Source/Luckyrobots/Public/LuckyRobotsGameState.h @@ -4,13 +4,13 @@ #include "CoreMinimal.h" #include "GameFramework/GameStateBase.h" -#include "LuckyrobotsGameState.generated.h" +#include "LuckyRobotsGameState.generated.h" /** * */ UCLASS() -class LUCKYROBOTS_API ALuckyrobotsGameState : public AGameStateBase +class LUCKYROBOTS_API ALuckyRobotsGameState : public AGameStateBase { GENERATED_BODY() diff --git a/Source/Luckyrobots/Public/LuckyrobotsPlayerController.h b/Source/Luckyrobots/Public/LuckyRobotsPlayerController.h similarity index 66% rename from Source/Luckyrobots/Public/LuckyrobotsPlayerController.h rename to Source/Luckyrobots/Public/LuckyRobotsPlayerController.h index 490537b0..8d5bff9b 100644 --- a/Source/Luckyrobots/Public/LuckyrobotsPlayerController.h +++ b/Source/Luckyrobots/Public/LuckyRobotsPlayerController.h @@ -4,13 +4,13 @@ #include "CoreMinimal.h" #include "GameFramework/PlayerController.h" -#include "LuckyrobotsPlayerController.generated.h" +#include "LuckyRobotsPlayerController.generated.h" /** * */ UCLASS() -class LUCKYROBOTS_API ALuckyrobotsPlayerController : public APlayerController +class LUCKYROBOTS_API ALuckyRobotsPlayerController : public APlayerController { GENERATED_BODY() diff --git a/Source/Luckyrobots/Public/SharedDef.h b/Source/Luckyrobots/Public/SharedDef.h index e5bb1cb6..70952b69 100644 --- a/Source/Luckyrobots/Public/SharedDef.h +++ b/Source/Luckyrobots/Public/SharedDef.h @@ -113,7 +113,7 @@ public: UPROPERTY(EditAnywhere, BlueprintReadWrite) - FString LevelName; + TSoftObjectPtr LevelObject; UPROPERTY(EditAnywhere, BlueprintReadWrite) UTexture2D* LevelImage;