You've already forked LuckyWorld
Optimize some gameinstance codes
This commit is contained in:
26
Source/Luckyrobots/Public/GameUserWidget.h
Normal file
26
Source/Luckyrobots/Public/GameUserWidget.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 "GameUserWidget.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class LUCKYROBOTS_API UGameUserWidget : public UUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
protected:
|
||||
virtual void NativeConstruct();
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void DoLogItemAdd(const FString& Topic, const FString& MsgText,int Type);
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void DoRefreshListView();
|
||||
};
|
@ -8,6 +8,7 @@
|
||||
#include "LuckyRobotsGameInstance.generated.h"
|
||||
|
||||
class USIOJsonValue;
|
||||
class UGameUserWidget;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ -39,10 +40,20 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FGoalsTaskData TempTask;
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void DoGetDispatch(const FString& EventName, USIOJsonValue* EventData);
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
UGameUserWidget* GameUserWidget;
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void DoSendMessage(FString SendValue);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void DoLogItemAdd(FString Topic, FString MsgText, int Type);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SwitchGamePaused();
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void ClearTaskList();
|
||||
|
||||
@ -69,4 +80,11 @@ public:
|
||||
|
||||
UFUNCTION(BlueprintPure)
|
||||
TArray<FGoalsTaskData> GetTaskList();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void DoSetTempTaskValueChange(bool IsClear);
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void DoGetDispatch(const FString& EventName, USIOJsonValue* EventData);
|
||||
};
|
||||
|
Reference in New Issue
Block a user