You've already forked LuckyWorld
Optimize code to unreal style
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
@ -7,16 +5,12 @@
|
||||
#include "SharedDef.h"
|
||||
#include "MainScreenUserWidget.generated.h"
|
||||
|
||||
class UDataTable;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class LUCKYROBOTS_API UMainScreenUserWidget : public UUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
protected:
|
||||
virtual void NativeConstruct();
|
||||
virtual void NativeConstruct() override;
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
@ -26,24 +20,29 @@ public:
|
||||
TArray<FLevelData> LevelDataList;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int iCurrentSelectRobot;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int iCurrentSelectLevel;
|
||||
int32 CurrentRobotIndex;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int iCurrentSelectQuality;
|
||||
int32 CurrentLevelIndex;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int32 CurrentQualityIndex;
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void InitData();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void InitRobotData();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void InitLevelData();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
FRobotData GetCurrentRobotData();
|
||||
FRobotData GetCurrentRobotData() const;
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
FLevelData GetCurrentLevelData();
|
||||
FLevelData GetCurrentLevelData() const;
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SelectNextRobot();
|
||||
|
Reference in New Issue
Block a user