Files

29 lines
597 B
C#
Raw Permalink Normal View History

2024-01-27 08:49:55 +08:00
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class TimeText3D : MonoBehaviour
{
public TMP_Text TextObject;
void Update()
{
if (TextObject)
{
string Time = TimeController.PublicFormattedTimeOfDay;
TextObject.text = "In-game time: " + Time;
}
}
public void SetTimeFormat(bool is24hour)
{
TimeController.MilitaryTime = is24hour;
}
private void OnMouseDown()
{
SetTimeFormat(!TimeController.MilitaryTime);
}
}