Files
racesm/Assets/Scripts/map selector script/TimeOfDay.cs
PokingPines 06756d418a Map selector
2024-04-25 12:57:44 +02:00

32 lines
638 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class TimeOfDay : MonoBehaviour
{
public string skyboxMaterial;
public static TimeOfDay Instance;
public TextMeshProUGUI MainText;
public void ChangeToDayTime()
{
skyboxMaterial = "Day";
}
public void ChangeToNightTime()
{
skyboxMaterial = "Night";
}
private void Awake()
{
Instance = this;
DontDestroyOnLoad(gameObject);
}
private void Update()
{
MainText.text = "Selected time of day: \n" + skyboxMaterial;
}
}