using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class NewBehaviourScript : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Text mytxt = GameObject.Find ("Canvas/Panel/Text").GetComponent<Text> ();
//mytxt.text =Random.Range(1,4).ToString();
mytxt.text =Time.time.ToString();
//float translation = Time.deltaTime * 10;
}
public void myfun()
{
//Time.timeScale=0;
}
}
using System.Collections;
using UnityEngine.UI;
public class NewBehaviourScript : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Text mytxt = GameObject.Find ("Canvas/Panel/Text").GetComponent<Text> ();
//mytxt.text =Random.Range(1,4).ToString();
mytxt.text =Time.time.ToString();
//float translation = Time.deltaTime * 10;
}
public void myfun()
{
//Time.timeScale=0;
}
}
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class NewBehaviourScript1 : MonoBehaviour {
void Start () {
}
// Update is called once per frame
void Update () {
Text mytxt = GameObject.Find ("Canvas/Panel/Text").GetComponent<Text> ();
//mytxt.text =Random.Range(1,4).ToString();
mytxt.text = Time.time.ToString ();
}
public void myfun()
{
Time.timeScale = 0;
}
}
using System.Collections;
using UnityEngine.UI;
public class NewBehaviourScript1 : MonoBehaviour {
void Start () {
}
// Update is called once per frame
void Update () {
Text mytxt = GameObject.Find ("Canvas/Panel/Text").GetComponent<Text> ();
//mytxt.text =Random.Range(1,4).ToString();
mytxt.text = Time.time.ToString ();
}
public void myfun()
{
Time.timeScale = 0;
}
}
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class NewBehaviourScript2 : MonoBehaviour {
public bool timerOn = true;
float time;
// Use this for initialization
// 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 = Time.time.ToString ();
}
}
using System.Collections;
using UnityEngine.UI;
public class NewBehaviourScript2 : MonoBehaviour {
public bool timerOn = true;
float time;
// Use this for initialization
// 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 = Time.time.ToString ();
}
}
沒有留言:
張貼留言