29 lines
597 B
C#
Executable File
29 lines
597 B
C#
Executable File
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);
|
|
}
|
|
}
|