|
|
|
|
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;
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
dateTxt.text = date;
|
|
|
|
|
}
|
|
|
|
|
}
|