您的位置:首页 > 其它

距离某天还有多久

2014-06-23 13:47 288 查看
using UnityEngine;
using System.Collections;
using System;

public class test : MonoBehaviour {
DateTime dt1;
DateTime dt2;
TimeSpan ts;
public GameObject mObj;
private UILabel mLab;
// Use this for initialization
void Start () {

dt2 = new DateTime(2014,1,18);
mLab = mObj.GetComponent<UILabel>();
}

// Update is called once per frame
void Update () {
dt1 = DateTime.Now;
ts = dt1.Subtract(dt2);
mLab.text = ts.ToString();
Debug.Log(ts);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: