update
This commit is contained in:
parent
e87d5a2013
commit
0dc0e58cfc
10
Source/Luckyrobots/Private/MainScreenUserWidget.cpp
Normal file
10
Source/Luckyrobots/Private/MainScreenUserWidget.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "MainScreenUserWidget.h"
|
||||
#include "Engine/DataTable.h"
|
||||
|
||||
void UMainScreenUserWidget::InitData()
|
||||
{
|
||||
|
||||
}
|
26
Source/Luckyrobots/Public/MainScreenUserWidget.h
Normal file
26
Source/Luckyrobots/Public/MainScreenUserWidget.h
Normal file
@ -0,0 +1,26 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Blueprint/UserWidget.h"
|
||||
#include "MainScreenUserWidget.generated.h"
|
||||
|
||||
class UDataTable;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class LUCKYROBOTS_API UMainScreenUserWidget : public UUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
||||
UDataTable* RobotDataDataTable;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
||||
UDataTable* LevelDataTable;
|
||||
public:
|
||||
void InitData();
|
||||
};
|
82
Source/Luckyrobots/Public/SharedDef.h
Normal file
82
Source/Luckyrobots/Public/SharedDef.h
Normal file
@ -0,0 +1,82 @@
|
||||
#pragma once
|
||||
|
||||
#include "Engine/DataTable.h"
|
||||
#include "SharedDef.generated.h"
|
||||
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ERobotsCategories : uint8
|
||||
{
|
||||
Wheeled UMETA(DisplayName = "Wheeled Robots"),
|
||||
FourLegged UMETA(DisplayName = "Four-Legged Robots"),
|
||||
TwoLegged UMETA(DisplayName = "Two-Legged Robots"),
|
||||
Stationary UMETA(DisplayName = "Stationary Robots"),
|
||||
IndoorFlying UMETA(DisplayName = "Indoor Flying Robots"),
|
||||
SwimmingUnderwater UMETA(DisplayName = "Swimming/Underwater Robots"),
|
||||
CrawlingModular UMETA(DisplayName = "Crawling/Modular Robots"),
|
||||
Arm UMETA(DisplayName = "Arm-Robots"),
|
||||
OutdoorFlying UMETA(DisplayName = "Outdoor Flying Robots")
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ELevelType : uint8
|
||||
{
|
||||
Home UMETA(DisplayName = "Home"),
|
||||
Office UMETA(DisplayName = "Office"),
|
||||
Street UMETA(DisplayName = "Street"),
|
||||
TestLevel UMETA(DisplayName = "TestLevel")
|
||||
};
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
struct FRobotData : public FTableRowBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FString Name;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TSubclassOf<AActor> RobotClass;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FTransform Transform;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
bool bActive;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
UTexture2D* RobotImage;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
ERobotsCategories RobotType;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FString HelpStr;
|
||||
};
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
struct FLevelData : public FTableRowBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int ID;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FString LevelName;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
ELevelType LevelType;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FString MenuName;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
UTexture2D* LevelImage;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
bool bActive;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TArray<ERobotsCategories> RobotTypeList;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user