This commit is contained in:
Martin2
2025-03-28 16:13:47 +08:00
parent 0dc0e58cfc
commit 1f30fa13a1
8 changed files with 153 additions and 1 deletions

View File

@ -4,6 +4,7 @@
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "SharedDef.h"
#include "MainScreenUserWidget.generated.h"
class UDataTable;
@ -21,6 +22,32 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
UDataTable* LevelDataTable;
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<FRobotData> RobotDataList;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<FLevelData> LevelDataList;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int iCurrentSelectRobot;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int iCurrentSelectLevel;
public:
UFUNCTION(BlueprintCallable)
void InitData();
UFUNCTION(BlueprintCallable)
void InitRobotData();
UFUNCTION(BlueprintCallable)
void InitLevelData();
UFUNCTION(BlueprintCallable)
FRobotData GetCurrentRobotData();
UFUNCTION(BlueprintCallable)
FLevelData GetCurrentLevelData();
public:
UFUNCTION(BlueprintImplementableEvent)
void BPUpdateSelectRobot();
UFUNCTION(BlueprintImplementableEvent)
void BPUpdateSelectLevel();
};

View File

@ -1,6 +1,5 @@
#pragma once
#include "Engine/DataTable.h"
#include "SharedDef.generated.h"