You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.2 KiB

3 years ago
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class InfoWnd : MonoBehaviour
{
public Text carInTxt;
public Text carOutTxt;
public Text carAllTxt;
3 years ago
public Text dateTxt;
public string date;
public void Init()
{
}
public void SetCarInText(int Addvalue)
{
int n = int.Parse(carInTxt.text) + Addvalue;
carInTxt.text = n.ToString();
int n1 = int.Parse(carAllTxt.text) + Addvalue;
carAllTxt.text = n1.ToString();
}
public void SetCarOutText(int Addvalue)
{
int n = int.Parse(carOutTxt.text) + Addvalue;
carOutTxt.text = n.ToString();
int n1 = int.Parse(carAllTxt.text) + Addvalue;
carAllTxt.text = n1.ToString();
}
3 years ago
3 years ago
public void UpdateTime()
{
var hour = DateTime.Now.Hour;
var minute = DateTime.Now.Minute;
var second = DateTime.Now.Second;
var year = DateTime.Now.Year;
var month = DateTime.Now.Month;
var day = DateTime.Now.Day;
date = string.Format( "{0:D4}/{1:D2}/{2:D2}"+"-"+"{3:D2}:{4:D2}:{5:D2} " , year, month, day,hour, minute, second);
3 years ago
dateTxt.text = date;
}
}