diff --git a/Assets/Scenes/GameScene.unity b/Assets/Scenes/GameScene.unity index d860d3b..e5ec1d3 100644 --- a/Assets/Scenes/GameScene.unity +++ b/Assets/Scenes/GameScene.unity @@ -3504,6 +3504,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 1609280383408315754, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} + propertyPath: orthographic size + value: 12.5 + objectReference: {fileID: 0} - target: {fileID: 3401975006071930001, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} propertyPath: m_Targets.Array.data[0].target value: diff --git a/Assets/Scripts/Managers/GameManager.cs b/Assets/Scripts/Managers/GameManager.cs index e6ae095..905b293 100644 --- a/Assets/Scripts/Managers/GameManager.cs +++ b/Assets/Scripts/Managers/GameManager.cs @@ -10,15 +10,19 @@ public class GameManager : MonoBehaviour public Action OnPlayerDied; + private string penisSuriveTime = ""; + void Awake() { - if (Instance != null) + if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); } - - Destroy(gameObject); + else + { + Destroy(gameObject); + } } void Start() @@ -30,6 +34,10 @@ public class GameManager : MonoBehaviour Debug.Break(); } + public void setTime(string t) { + penisSuriveTime = t; + } + // Update is called once per frame void Update() { diff --git a/Assets/Scripts/UI/SurvivalTimer.cs b/Assets/Scripts/UI/SurvivalTimer.cs index c7efcd3..cb80453 100644 --- a/Assets/Scripts/UI/SurvivalTimer.cs +++ b/Assets/Scripts/UI/SurvivalTimer.cs @@ -22,5 +22,6 @@ public class SurvivalTimer : MonoBehaviour int minutes = Mathf.FloorToInt(elapsedTime / 60); int seconds = Mathf.FloorToInt(elapsedTime % 60); timerText.text = string.Format("{00:00}:{01:00}", minutes, seconds); + GameManager.Instance.setTime(timerText.text); } }