Skip to content

Commit b92ad43

Browse files
committed
Revert "fix god mode status as result of singleton"
This reverts commit 9c803a9.
1 parent 9c803a9 commit b92ad43

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

Assets/Scripts/GodModeIndicator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class GodModeIndicator : MonoBehaviour
1616
private string activeSceneName;
1717

1818
// Actions
19-
public static event System.Action<bool> onGodModeActivated;
19+
public static event System.Action onGodModeActivated;
2020

2121
void Awake()
2222
{
@@ -56,7 +56,7 @@ private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
5656
if (activeSceneName != lobbySceneName)
5757
{
5858
Debug.Log($"Scene changed to {activeSceneName}. God mode status: {isGodModeActive}");
59-
onGodModeActivated?.Invoke(isGodModeActive);
59+
onGodModeActivated?.Invoke();
6060
}
6161
else
6262
{

Assets/Scripts/Player.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,10 @@ private void LevelUp()
395395
/// The player should not be able to use this in the final game - well, except if they really wanted to via Options.
396396
/// This prevents oxygen depletion, loss of stamina when sprinting,
397397
/// </summary>
398-
private void GodMode(bool godModeStaus)
398+
private void GodMode()
399399
{
400-
godMode = godModeStaus;
400+
// First, invert the bool. This covers the button being used to enable/disable god mode.
401+
godMode = !godMode;
401402

402403
Debug.Log($"Acquired signal from GodModeIndicator. God mode is now " + (godMode ? "enabled." : "disabled."));
403404

0 commit comments

Comments
 (0)