39 lines
700 B
C#
39 lines
700 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class ScriptMenuChangeTime : MonoBehaviour
|
|
{
|
|
private TextMeshProUGUI text;
|
|
|
|
private void Awake()
|
|
{
|
|
text = gameObject.GetComponentInChildren<TextMeshProUGUI>();
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
if (GameSetting.isNight)
|
|
{
|
|
text.text = "Night";
|
|
}
|
|
else
|
|
{
|
|
text.text = "Day";
|
|
}
|
|
}
|
|
|
|
public void ChageNumberChangeTime()
|
|
{
|
|
if (GameSetting.isNight)
|
|
{
|
|
GameSetting.isNight = true;
|
|
text.text = "Night";
|
|
}
|
|
else
|
|
{
|
|
GameSetting.isNight = false;
|
|
text.text = "Day";
|
|
}
|
|
}
|
|
}
|