Skip to content

Commit

Permalink
Merge pull request #93 from MashdorDev/WinLoseCondition
Browse files Browse the repository at this point in the history
Win lose condition
  • Loading branch information
rylerbleau authored Feb 19, 2024
2 parents d300a11 + 2628d67 commit f724974
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Content/Unbread/Core/Character/BP_Character.uasset
Git LFS file not shown
3 changes: 3 additions & 0 deletions Content/Unbread/Environment/BP_WinVolume.uasset
Git LFS file not shown
4 changes: 2 additions & 2 deletions Content/Unbread/Maps/Testing_Maps/AudioTest.umap
Git LFS file not shown
6 changes: 3 additions & 3 deletions Source/unbread/Private/SRespawnGameMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Source/unbread/Public/SRespawnGameMode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f724974

Please sign in to comment.