You've already forked LuckyWorld
Update
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Engine/GameInstance.h"
|
||||
#include "SharedDef.h"
|
||||
#include "LuckyrobotsGameInstance.generated.h"
|
||||
|
||||
/**
|
||||
@ -13,5 +14,14 @@ UCLASS()
|
||||
class LUCKYROBOTS_API ULuckyrobotsGameInstance : public UGameInstance
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
ERobotsName CurrentSelectRobot;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
ELevelEnum CurrentSelectLevel;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
EQualityEnum CurrentSelectQuality;
|
||||
};
|
||||
|
@ -15,7 +15,9 @@ UCLASS()
|
||||
class LUCKYROBOTS_API UMainScreenUserWidget : public UUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
protected:
|
||||
virtual void NativeConstruct();
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
||||
UDataTable* RobotDataDataTable;
|
||||
@ -34,6 +36,10 @@ public:
|
||||
int iCurrentSelectRobot;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int iCurrentSelectLevel;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int iCurrentSelectQuality;
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void InitData();
|
||||
@ -45,9 +51,34 @@ public:
|
||||
FRobotData GetCurrentRobotData();
|
||||
UFUNCTION(BlueprintCallable)
|
||||
FLevelData GetCurrentLevelData();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SelectNextRobot();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SelectPreviousRobot();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SelectNextLevel();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SelectPreviousLevel();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SelectNextQuality();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SelectPreviousQuality();
|
||||
|
||||
void UpdateSelectRobot();
|
||||
void UpdateSelectLevel();
|
||||
void UpdateSelectQuality();
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void BPUpdateSelectRobot();
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void BPUpdateSelectLevel();
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void BPUpdateSelectQuality();
|
||||
};
|
||||
|
@ -17,6 +17,24 @@ enum class ERobotsCategories : uint8
|
||||
OutdoorFlying UMETA(DisplayName = "Outdoor Flying Robots")
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ERobotsName : uint8
|
||||
{
|
||||
None UMETA(DisplayName = "None"),
|
||||
Luck_e UMETA(DisplayName = "Luck-e"),
|
||||
Stretch UMETA(DisplayName = "Stretch"),
|
||||
LuckyDrone UMETA(DisplayName = "Lucky Drone"),
|
||||
DJIDrone UMETA(DisplayName = "DJI Drone"),
|
||||
ArmLucky UMETA(DisplayName = "Arm Lucky"),
|
||||
UnitreeG1 UMETA(DisplayName = "Unitree G1"),
|
||||
StretchRobotV1 UMETA(DisplayName = "Stretch Robot V1"),
|
||||
PandaArmRobot UMETA(DisplayName = "Panda Arm Robot"),
|
||||
PuralinkRobot UMETA(DisplayName = "Puralink Robot"),
|
||||
UnitreeGo2 UMETA(DisplayName = "Unitree Go 2"),
|
||||
RevoluteRobot UMETA(DisplayName = "Revolute Robot"),
|
||||
BostonSpotRobot UMETA(DisplayName = "Boston Spot Robot")
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ELevelType : uint8
|
||||
{
|
||||
@ -26,13 +44,39 @@ enum class ELevelType : uint8
|
||||
TestLevel UMETA(DisplayName = "TestLevel")
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ELevelEnum : uint8
|
||||
{
|
||||
None UMETA(DisplayName = "None"),
|
||||
TestLevel UMETA(DisplayName = "Test Level"),
|
||||
Loft UMETA(DisplayName = "Loft"),
|
||||
Rome UMETA(DisplayName = "Rome"),
|
||||
Paris UMETA(DisplayName = "Paris"),
|
||||
Marseille UMETA(DisplayName = "Marseille"),
|
||||
Istanbul UMETA(DisplayName = "Istanbul"),
|
||||
Office UMETA(DisplayName = "Office"),
|
||||
BasicForest UMETA(DisplayName = "Basic Forest"),
|
||||
NaturalForest UMETA(DisplayName = "Natural Forest"),
|
||||
KitchenForArmRobot UMETA(DisplayName = "Kitchen for Arm Robot"),
|
||||
PipeFabric UMETA(DisplayName = "Pipe Fabric")
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class EQualityEnum : uint8
|
||||
{
|
||||
Epic UMETA(DisplayName = "Epic"),
|
||||
High UMETA(DisplayName = "High"),
|
||||
Middle UMETA(DisplayName = "Middle"),
|
||||
Low UMETA(DisplayName = "Low")
|
||||
};
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
struct FRobotData : public FTableRowBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FString Name;
|
||||
ERobotsName Name;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TSubclassOf<AActor> RobotClass;
|
||||
@ -50,7 +94,7 @@ public:
|
||||
ERobotsCategories RobotType;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FString HelpStr;
|
||||
FText HelpText;
|
||||
};
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
@ -62,13 +106,14 @@ public:
|
||||
int ID;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FString LevelName;
|
||||
ELevelEnum LevelEnum;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
ELevelType LevelType;
|
||||
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FString MenuName;
|
||||
FString LevelName;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
UTexture2D* LevelImage;
|
||||
|
Reference in New Issue
Block a user