2016年10月14日 星期五

時間




using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System;

public class NewBehaviourScript2 : MonoBehaviour {
public bool timerOn =  true;
float time;
// Use this for initialization
void Start () {


}

// Update is called once per frame
void Update () {


if (timerOn) {
time += Time.deltaTime;
}

Text mytxt = GameObject.Find ("Canvas/Panel/Text").GetComponent<Text> ();
//mytxt.text =Random.Range(1,4).ToString();
mytxt.text = System.DateTime.Now.ToString ();


}


}

沒有留言:

張貼留言