添加新游戏功能

This commit is contained in:
997146918 2025-10-28 19:58:18 +08:00
parent 4821d206c0
commit c07849c95b
11 changed files with 11 additions and 3 deletions

View File

@ -2,7 +2,7 @@
"BuildId": "37670630", "BuildId": "37670630",
"Modules": "Modules":
{ {
"ProjectFish": "UnrealEditor-ProjectFish.dll", "ProjectFish": "UnrealEditor-ProjectFish-0001.dll",
"ProjectFishEditor": "UnrealEditor-ProjectFishEditor.dll" "ProjectFishEditor": "UnrealEditor-ProjectFishEditor-0001.dll"
} }
} }

Binary file not shown.

Binary file not shown.

View File

@ -2,6 +2,6 @@
"BuildId": "37670630", "BuildId": "37670630",
"Modules": "Modules":
{ {
"DeskMode": "UnrealEditor-DeskMode.dll" "DeskMode": "UnrealEditor-DeskMode-0001.dll"
} }
} }

View File

@ -17,6 +17,11 @@ void UGameInfoManager::Initialize(FSubsystemCollectionBase& Collection)
} }
} }
void UGameInfoManager::NewSaveGame()
{
UGameplayStatics::DeleteGameInSlot(SaveGameSlotName, 0);
}
void UGameInfoManager::SaveGameInfo() void UGameInfoManager::SaveGameInfo()
{ {
if (!IsValid(PlayerInfo.Get())) if (!IsValid(PlayerInfo.Get()))

View File

@ -18,6 +18,8 @@ public:
virtual void Initialize(FSubsystemCollectionBase& Collection) override; virtual void Initialize(FSubsystemCollectionBase& Collection) override;
public: public:
UFUNCTION(BlueprintCallable)
void NewSaveGame();
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
void SaveGameInfo(); void SaveGameInfo();
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
@ -30,5 +32,6 @@ public:
protected: protected:
UPROPERTY(BlueprintReadOnly) UPROPERTY(BlueprintReadOnly)
TObjectPtr<class UPlayerInfoSaveGame> PlayerInfo; TObjectPtr<class UPlayerInfoSaveGame> PlayerInfo;
static FString SaveGameSlotName; static FString SaveGameSlotName;
}; };