mirror of
https://github.com/DerTyp7/example-top-down-unity.git
synced 2025-10-30 12:57:08 +01:00
added TimeUI
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
|
||||
public class Calendar : MonoBehaviour
|
||||
{
|
||||
@@ -11,6 +12,13 @@ public class Calendar : MonoBehaviour
|
||||
[SerializeField]
|
||||
Color currentDayColor;
|
||||
Color originDayColor;
|
||||
|
||||
[SerializeField]
|
||||
TextMeshProUGUI monthText;
|
||||
[SerializeField]
|
||||
TextMeshProUGUI yearText;
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
daysTransform = transform.Find("Days");
|
||||
@@ -32,6 +40,9 @@ public class Calendar : MonoBehaviour
|
||||
|
||||
int daysInMonth = DateTime.DaysInMonth(dateTime.Year, dateTime.Month);
|
||||
|
||||
monthText.text = dateTime.ToString("MMMM");
|
||||
yearText.text = dateTime.ToString("yyyy");
|
||||
|
||||
counter = 1;
|
||||
while (counter <= 31)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user