From 9f1cff61160aa68eab3a512f28dd0fcabbfb3149 Mon Sep 17 00:00:00 2001 From: rylerbleau <73083256+rylerbleau@users.noreply.github.com> Date: Mon, 19 Feb 2024 16:27:03 -0500 Subject: [PATCH 1/2] Added win volume. Not tested. --- Content/Unbread/Core/Character/BP_Character.uasset | 4 ++-- Content/Unbread/Environment/BP_WinVolume.uasset | 3 +++ Source/unbread/Private/SRespawnGameMode.cpp | 6 +++--- Source/unbread/Public/SRespawnGameMode.h | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 Content/Unbread/Environment/BP_WinVolume.uasset diff --git a/Content/Unbread/Core/Character/BP_Character.uasset b/Content/Unbread/Core/Character/BP_Character.uasset index 58ad1bb5..3d9ef268 100644 --- a/Content/Unbread/Core/Character/BP_Character.uasset +++ b/Content/Unbread/Core/Character/BP_Character.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb3a6baafea6117049867e973a0777054aff0a82bda473f5c1ed04c4c7109226 -size 445465 +oid sha256:dc6a1a58a85f5d0f990e8a724c96cf7f86080bab7e3bc65aadfabeecc338cd88 +size 457818 diff --git a/Content/Unbread/Environment/BP_WinVolume.uasset b/Content/Unbread/Environment/BP_WinVolume.uasset new file mode 100644 index 00000000..f655ee6a --- /dev/null +++ b/Content/Unbread/Environment/BP_WinVolume.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc127c5b2a4a3b362bb479ace6949a8e1e02f6f1bef0e5fd5b361324d32db0aa +size 32539 diff --git a/Source/unbread/Private/SRespawnGameMode.cpp b/Source/unbread/Private/SRespawnGameMode.cpp index 35b9615c..b9c75291 100644 --- a/Source/unbread/Private/SRespawnGameMode.cpp +++ b/Source/unbread/Private/SRespawnGameMode.cpp @@ -53,15 +53,15 @@ bool ASRespawnGameMode::CheckLoss() { if(CurLives <= 0) { - EndGame(); + EndGame(false); return true; } return false; } -void ASRespawnGameMode::EndGame() +void ASRespawnGameMode::EndGame(bool Won) { - GameOver.Broadcast(false); + GameOver.Broadcast(Won); } void ASRespawnGameMode::SetSpawnLocation(FTransform Location) diff --git a/Source/unbread/Public/SRespawnGameMode.h b/Source/unbread/Public/SRespawnGameMode.h index f5bf9f36..866d9c38 100644 --- a/Source/unbread/Public/SRespawnGameMode.h +++ b/Source/unbread/Public/SRespawnGameMode.h @@ -45,8 +45,8 @@ class UNBREAD_API ASRespawnGameMode : public AGameMode UFUNCTION() bool CheckLoss(); - UFUNCTION() - void EndGame(); + UFUNCTION(BlueprintCallable) + void EndGame(bool Won); public: UFUNCTION(BlueprintCallable) From 2628d67504c864b82711dca8c9622bd95d816f97 Mon Sep 17 00:00:00 2001 From: rylerbleau <73083256+rylerbleau@users.noreply.github.com> Date: Mon, 19 Feb 2024 16:53:06 -0500 Subject: [PATCH 2/2] Added BP_Winvolume. Changed EndGame function to take bool parameter. Tested in AudioTest map. --- Content/Unbread/Environment/BP_WinVolume.uasset | 4 ++-- Content/Unbread/Maps/Testing_Maps/AudioTest.umap | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Content/Unbread/Environment/BP_WinVolume.uasset b/Content/Unbread/Environment/BP_WinVolume.uasset index f655ee6a..b7f6a766 100644 --- a/Content/Unbread/Environment/BP_WinVolume.uasset +++ b/Content/Unbread/Environment/BP_WinVolume.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc127c5b2a4a3b362bb479ace6949a8e1e02f6f1bef0e5fd5b361324d32db0aa -size 32539 +oid sha256:73bf340effe85846e937be2cea1ec7ee7b65ed38cfc549c8c2befd9e54426216 +size 32943 diff --git a/Content/Unbread/Maps/Testing_Maps/AudioTest.umap b/Content/Unbread/Maps/Testing_Maps/AudioTest.umap index 4c45bc35..3e75a0cf 100644 --- a/Content/Unbread/Maps/Testing_Maps/AudioTest.umap +++ b/Content/Unbread/Maps/Testing_Maps/AudioTest.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1b508d5b89ab0c0130fb6cc636928a55e32484fb2e7aa96892e3a8a7bee3f066 -size 61348 +oid sha256:d538ec6dc966db31c24202a2b0cf6f623f7105793ab1c2dc32ef4c456d91f182 +size 62674