Optimizing gameinstance

This commit is contained in:
martinluckyrobots
2025-04-09 15:18:16 +08:00
parent b3b61b6415
commit 17dc39a612
12 changed files with 76 additions and 4 deletions

View File

@ -7,6 +7,9 @@
#include "SharedDef.h"
#include "LuckyRobotsGameInstance.generated.h"
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnMessageDispatched, const FString&, Message);
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnRandomMeshesUpdated);
class USIOJsonValue;
class UGameUserWidget;
/**
@ -128,6 +131,13 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<FLuckyCode> LuckyCodeList;
public:
UPROPERTY(BlueprintCallable, BlueprintAssignable, Category = "Event")
FOnMessageDispatched OnMessageDispatched;
UPROPERTY(BlueprintCallable, BlueprintAssignable, Category = "Event")
FOnRandomMeshesUpdated OnRandomMeshesUpdated;
public:
UFUNCTION(BlueprintCallable)
void DoSendMessage(const FString& SendValue);
@ -190,6 +200,9 @@ public:
UFUNCTION(BlueprintPure, Category = "Selectable Items")
TArray<FSelectableItemData> GetSelectableItemList(EItemCategory ItemCategory);
UFUNCTION(BlueprintCallable)
void GetMessageParse(FString Json);
public:
UFUNCTION(BlueprintCallable)
void SetCurrentFolderName(const FString& FolderName);
@ -295,7 +308,4 @@ public:
UFUNCTION(BlueprintPure)
int32 GetWidgetTotalHit() const;
public:
UFUNCTION(BlueprintImplementableEvent)
void DoGetDispatch(const FString& EventName, USIOJsonValue* EventData);
};