diff --git a/Assets/Scenes/GameScene.unity b/Assets/Scenes/GameScene.unity index c470521..3f97538 100644 --- a/Assets/Scenes/GameScene.unity +++ b/Assets/Scenes/GameScene.unity @@ -811,10 +811,6 @@ PrefabInstance: propertyPath: m_IncludeLayers.m_Bits value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 3086165646112058191, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3} - propertyPath: onlyCallZeroHealthOnce - value: 1 - objectReference: {fileID: 0} - target: {fileID: 3086165646112058191, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3} propertyPath: OnHealthZero.m_PersistentCalls.m_Calls.Array.size value: 1 @@ -1451,10 +1447,6 @@ PrefabInstance: propertyPath: m_Parameters.widthCurve.m_Curve.Array.data[1].outWeight value: 0.33333334 objectReference: {fileID: 0} - - target: {fileID: 3086165646112058191, guid: 99a6ff8b9591949439b620b13bd249a4, type: 3} - propertyPath: onlyCallZeroHealthOnce - value: 1 - objectReference: {fileID: 0} - target: {fileID: 3086165646112058191, guid: 99a6ff8b9591949439b620b13bd249a4, type: 3} propertyPath: OnHealthZero.m_PersistentCalls.m_Calls.Array.size value: 1 @@ -4260,6 +4252,10 @@ PrefabInstance: propertyPath: m_Name value: UI objectReference: {fileID: 0} + - target: {fileID: 9075173710402410956, guid: 48e0e53445d42474895d37a321c39d1c, type: 3} + propertyPath: m_AnchoredPosition.x + value: -9.998047 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] diff --git a/Assets/Scripts/Managers/GameManager.cs b/Assets/Scripts/Managers/GameManager.cs index 1d3e266..27e2d27 100644 --- a/Assets/Scripts/Managers/GameManager.cs +++ b/Assets/Scripts/Managers/GameManager.cs @@ -21,17 +21,14 @@ public class GameManager : MonoBehaviour void Awake() { - if (Instance == null) + if (Instance != null) { - Instance = this; - DontDestroyOnLoad(gameObject); - Revives = 1; - ReviveText.text = Revives + "x"; - } - else - { - Destroy(gameObject); + Destroy(Instance); } + + Instance = this; + Revives = 1; + ReviveText.text = Revives + "x"; } void Start() @@ -40,6 +37,7 @@ public class GameManager : MonoBehaviour public void playerDied(GameObject who) { + Debug.Log($"{who.name} died"); if (Revives == 0) { AudioManager.Instance.StopAllAudio(); diff --git a/Assets/Scripts/Player/HealthComponent.cs b/Assets/Scripts/Player/HealthComponent.cs index dd73b72..ff9c66f 100644 --- a/Assets/Scripts/Player/HealthComponent.cs +++ b/Assets/Scripts/Player/HealthComponent.cs @@ -109,7 +109,10 @@ public class HealthComponent : MonoBehaviour, ISquezeDamageReceiver maxHealth = amount; if (heal) + { currentHealth = amount; + alreadyReachedZero = false; + } } public void TakeDamage(float damage) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index e875273..3525804 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -139,7 +139,8 @@ PlayerSettings: vulkanEnableCommandBufferRecycling: 1 loadStoreDebugModeEnabled: 0 bundleVersion: 1.0 - preloadedAssets: [] + preloadedAssets: + - {fileID: 11400000, guid: de04e34f85a966e4da851d9b3d804fa1, type: 2} metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1