diff --git a/Game/Assets/Scripts/DayIncrementPlaygroundScript.cs b/Game/Assets/Scripts/DayIncrementPlaygroundScript.cs index 0e6b01a..b976ade 100644 --- a/Game/Assets/Scripts/DayIncrementPlaygroundScript.cs +++ b/Game/Assets/Scripts/DayIncrementPlaygroundScript.cs @@ -1,27 +1,30 @@ -using System; +/* + * Author: Mark + * Date: 10/2/2025 + * Description: Playground test script for day incrementation and game manager state preservation + */ + using System.Collections; -using System.Collections.Generic; -using Unity.VisualScripting; using UnityEngine; using UnityEngine.SceneManagement; public class DayIncrementPlaygroundScript : MonoBehaviour { - [SerializeField] public bool isBeforeScene = false; + [SerializeField] public bool isBeforeScene; - private bool _testHasRun = false; + private bool _testHasRun; private void Update() { if (_testHasRun) return; - + // fire off Main to run in the background StartCoroutine(Main()); - + _testHasRun = true; } - IEnumerator Main() + private IEnumerator Main() { if (isBeforeScene) { @@ -30,24 +33,24 @@ public class DayIncrementPlaygroundScript : MonoBehaviour yield return new WaitForSeconds(3); Debug.Log($"hello vro, day is {GameManager.Instance.currentDay}"); - + // get game manager and then increment the day GameManager.Instance.IncrementDay(); Debug.Log($"post-increment day is {GameManager.Instance.currentDay}"); - - // change to the next scene - SceneManager.LoadScene("Scenes/Testing Scenes/Day Increment Playground After"); + // change to the next scene + // ReSharper disable once Unity.LoadSceneDisabledSceneName + SceneManager.LoadScene("Scenes/Testing Scenes/Day Increment Playground After"); } else { // wait for 3 seconds Debug.Log("initialisation wait..."); yield return new WaitForSeconds(3); - + Debug.Log($"hello vro, day is {GameManager.Instance.currentDay}"); } - + yield return 0; } -} +} \ No newline at end of file