From eeaf691a1a153ac260ed8f6e4a774c4b05f4882a Mon Sep 17 00:00:00 2001 From: Ji Yoon Rhee Date: Thu, 5 Sep 2024 11:43:15 +0900 Subject: [PATCH] saving/loading systems successfully migrated to player controller --- .../BP_HYPlayerCharacController.uasset | 4 +-- .../BP_PlayerCharacterBase.uasset | 4 +-- .../AOEBP/BP_AOEBase.uasset | 4 +-- .../AOEBP/BP_AOEOverTime.uasset | 4 +-- .../AOEBP/ChildrenAOE/BP_AOE_Fire.uasset | 4 +-- .../Interactables/BP_HaetaeStatueBase.uasset | 3 +++ .../UI/Player_HUD/WG_PlayerHUD.uasset | 2 +- .../1/4N/KIGVDZGKXZEXF0X8UFZUX8.uasset | 4 +-- .../8/AC/DL88DUTQ404452LSY7JG6Y.uasset | 3 +++ .../hwanyoung2/HYPlayerCharacController.h | 3 +++ .../Source/hwanyoung2/HYSaveGameActor.cpp | 22 +++++++++++++++ .../Source/hwanyoung2/HYSaveGameActor.h | 27 +++++++++++++++++++ 12 files changed, 71 insertions(+), 13 deletions(-) create mode 100644 hwanyoung2/Content/Hwanyoung/Interactables/BP_HaetaeStatueBase.uasset create mode 100644 hwanyoung2/Content/__ExternalActors__/ThirdPerson/Maps/ThirdPersonMap/8/AC/DL88DUTQ404452LSY7JG6Y.uasset create mode 100644 hwanyoung2/Source/hwanyoung2/HYSaveGameActor.cpp create mode 100644 hwanyoung2/Source/hwanyoung2/HYSaveGameActor.h diff --git a/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_HYPlayerCharacController.uasset b/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_HYPlayerCharacController.uasset index b2ffcc11..13be95dd 100644 --- a/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_HYPlayerCharacController.uasset +++ b/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_HYPlayerCharacController.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:393991b1093f64ec1cc370f1fee898b979d4642dc74d80d38c362c4709fb4ee7 -size 83228 +oid sha256:9705dda36e481d470905577e0263ecf12cc58df7a3bbc6dedb3b828b5c67b978 +size 175316 diff --git a/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_PlayerCharacterBase.uasset b/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_PlayerCharacterBase.uasset index 23daa7c6..744601c2 100644 --- a/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_PlayerCharacterBase.uasset +++ b/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_PlayerCharacterBase.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9bab5156ffc17c75b502880ef05fc68f823c26c1ac5dda4ff187ed67b6aa9c30 -size 347965 +oid sha256:f0f6944c8ea44dcefc9c569afd2fd618d5784142ef62b0db06ea08320c005972 +size 283982 diff --git a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/AOEBP/BP_AOEBase.uasset b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/AOEBP/BP_AOEBase.uasset index 4276499f..1c990da7 100644 --- a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/AOEBP/BP_AOEBase.uasset +++ b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/AOEBP/BP_AOEBase.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3a6bef2469076bf10f3f0440faacbfae8b649a2750e5d58ab0eb63d9132427f -size 110369 +oid sha256:632db0d062a81d07804ba1537a0badb5aa9c85d27bfb5a683a0f9aaec1401e33 +size 107104 diff --git a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/AOEBP/BP_AOEOverTime.uasset b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/AOEBP/BP_AOEOverTime.uasset index 4cbcf8a8..78fa6600 100644 --- a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/AOEBP/BP_AOEOverTime.uasset +++ b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/AOEBP/BP_AOEOverTime.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ffc2249cbfa593785a9abf1b96fe777e7d6fbc596a44e4d53eb4c78a18410a75 -size 58030 +oid sha256:4a3b57e98cbeebc69db69b26c721cc73a1162ebe08fcda19764e61bfdbf0a60f +size 57290 diff --git a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/AOEBP/ChildrenAOE/BP_AOE_Fire.uasset b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/AOEBP/ChildrenAOE/BP_AOE_Fire.uasset index 8161f046..7026b35f 100644 --- a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/AOEBP/ChildrenAOE/BP_AOE_Fire.uasset +++ b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/AOEBP/ChildrenAOE/BP_AOE_Fire.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:70cea0ad5974e4bd04cd0d80ec14c8447ec883f43abf1251d75fccefdecb5ddb -size 84811 +oid sha256:58ed05f004817edcfe2e0e9a05543c4c33c4301b9dc0aec840471a1fd8b97e47 +size 95411 diff --git a/hwanyoung2/Content/Hwanyoung/Interactables/BP_HaetaeStatueBase.uasset b/hwanyoung2/Content/Hwanyoung/Interactables/BP_HaetaeStatueBase.uasset new file mode 100644 index 00000000..515c6468 --- /dev/null +++ b/hwanyoung2/Content/Hwanyoung/Interactables/BP_HaetaeStatueBase.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c08740a138d5cef86285d04e76384a267d3378dc9b789c55bb98c25d1423c22 +size 42703 diff --git a/hwanyoung2/Content/Hwanyoung/UI/Player_HUD/WG_PlayerHUD.uasset b/hwanyoung2/Content/Hwanyoung/UI/Player_HUD/WG_PlayerHUD.uasset index 3cb3bdda..b3da4888 100644 --- a/hwanyoung2/Content/Hwanyoung/UI/Player_HUD/WG_PlayerHUD.uasset +++ b/hwanyoung2/Content/Hwanyoung/UI/Player_HUD/WG_PlayerHUD.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ebed5645ac9affbd3deba4b1e308787f63fe1bf8209197831917a7fda572ab0d +oid sha256:9a71b263669b89695e8c18cff0dd63e3a08fcd5ec8326f5ddd56b79f3e46b83a size 96441 diff --git a/hwanyoung2/Content/__ExternalActors__/ThirdPerson/Maps/ThirdPersonMap/1/4N/KIGVDZGKXZEXF0X8UFZUX8.uasset b/hwanyoung2/Content/__ExternalActors__/ThirdPerson/Maps/ThirdPersonMap/1/4N/KIGVDZGKXZEXF0X8UFZUX8.uasset index fae1a360..a0bd3f46 100644 --- a/hwanyoung2/Content/__ExternalActors__/ThirdPerson/Maps/ThirdPersonMap/1/4N/KIGVDZGKXZEXF0X8UFZUX8.uasset +++ b/hwanyoung2/Content/__ExternalActors__/ThirdPerson/Maps/ThirdPersonMap/1/4N/KIGVDZGKXZEXF0X8UFZUX8.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46cf7b99763c0d63a21087acf7de7359b3f59320af1b5037bf917be8453414f9 -size 3887 +oid sha256:8c297bf9edc5851c607f0e78ef925823e219e533d9c938d85d5d0f9de14dcdc1 +size 4070 diff --git a/hwanyoung2/Content/__ExternalActors__/ThirdPerson/Maps/ThirdPersonMap/8/AC/DL88DUTQ404452LSY7JG6Y.uasset b/hwanyoung2/Content/__ExternalActors__/ThirdPerson/Maps/ThirdPersonMap/8/AC/DL88DUTQ404452LSY7JG6Y.uasset new file mode 100644 index 00000000..2a15df3a --- /dev/null +++ b/hwanyoung2/Content/__ExternalActors__/ThirdPerson/Maps/ThirdPersonMap/8/AC/DL88DUTQ404452LSY7JG6Y.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a7e753495bbb2569cf6a9fdcd207d071ee4fe8debbd9e53be490ad806ae666d +size 3702 diff --git a/hwanyoung2/Source/hwanyoung2/HYPlayerCharacController.h b/hwanyoung2/Source/hwanyoung2/HYPlayerCharacController.h index 53174d0c..f140f7a1 100644 --- a/hwanyoung2/Source/hwanyoung2/HYPlayerCharacController.h +++ b/hwanyoung2/Source/hwanyoung2/HYPlayerCharacController.h @@ -28,6 +28,9 @@ public: UFUNCTION(BlueprintImplementableEvent) void ReloadCraftUI(); + UFUNCTION(BlueprintImplementableEvent) + void SaveGameplay(); + UFUNCTION(BlueprintCallable, Category = "Utils") int32 GetInventoryWeight(); diff --git a/hwanyoung2/Source/hwanyoung2/HYSaveGameActor.cpp b/hwanyoung2/Source/hwanyoung2/HYSaveGameActor.cpp new file mode 100644 index 00000000..c6eb586e --- /dev/null +++ b/hwanyoung2/Source/hwanyoung2/HYSaveGameActor.cpp @@ -0,0 +1,22 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "HYSaveGameActor.h" +#include "HYPlayerCharacController.h" + +AHYSaveGameActor::AHYSaveGameActor() +{ + SavepointMesh = CreateDefaultSubobject("SavepointMesh"); + RootComponent = Cast(SavepointMesh); + + Super::Name = "Haetae statue"; + Super::Action = "touch"; +} + +void AHYSaveGameActor::Interact_Implementation(APlayerController* Controller) +{ + Super::Interact_Implementation(Controller); + + AHYPlayerCharacController* IController = Cast(Controller); + IController->SaveGameplay(); +} diff --git a/hwanyoung2/Source/hwanyoung2/HYSaveGameActor.h b/hwanyoung2/Source/hwanyoung2/HYSaveGameActor.h new file mode 100644 index 00000000..a3e05e32 --- /dev/null +++ b/hwanyoung2/Source/hwanyoung2/HYSaveGameActor.h @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "HYInteractableActor.h" +#include "HYSaveGameActor.generated.h" + +/** + * + */ +UCLASS() +class HWANYOUNG2_API AHYSaveGameActor : public AHYInteractableActor +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + AHYSaveGameActor(); + + void Interact_Implementation(APlayerController* Controller) override; + +protected: + UPROPERTY(EditDefaultsOnly) + UStaticMeshComponent* SavepointMesh; + +};