game(scripts): standardise DayIncrementPlaygroundScript
This commit is contained in:
parent
3465373560
commit
d326e662dd
1 changed files with 18 additions and 15 deletions
|
@ -1,15 +1,18 @@
|
|||
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()
|
||||
{
|
||||
|
@ -21,7 +24,7 @@ public class DayIncrementPlaygroundScript : MonoBehaviour
|
|||
_testHasRun = true;
|
||||
}
|
||||
|
||||
IEnumerator Main()
|
||||
private IEnumerator Main()
|
||||
{
|
||||
if (isBeforeScene)
|
||||
{
|
||||
|
@ -36,8 +39,8 @@ public class DayIncrementPlaygroundScript : MonoBehaviour
|
|||
Debug.Log($"post-increment day is {GameManager.Instance.currentDay}");
|
||||
|
||||
// change to the next scene
|
||||
// ReSharper disable once Unity.LoadSceneDisabledSceneName
|
||||
SceneManager.LoadScene("Scenes/Testing Scenes/Day Increment Playground After");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue