using UnityEngine; using System.Collections; using UnityEngine.UI; public class testTemp : MonoBehaviour { /// /// 速度1500毫秒 /// public float mSpeed; /// /// /// public float mRate = 1; /// /// /// private float mCurt = 0; /// /// /// private float mRelt = 0; private float mTemp= 0; /// /// /// private bool isOver = false; public Slider mSlider = null; void Start () { } // Update is called once per frame void Update () { mTemp += mSpeed; this.mCurt = Mathf.Lerp(1, this.mRate, mTemp); Debug.LogError(this.mCurt); mSlider.value= this.mCurt; } //void OnGUI() //{ // if (GUI.Button(new Rect(10, 10, 100, 50), "pause")) // { // timeHelper.Pause(); // //isOpen = false; // } // if (GUI.Button(new Rect(10, 70, 100, 50), "continue")) // { // timeHelper.Continue(); // //isOpen = true; // //Debug.LogError(this.timeHelper.Now() - this.lastTime); // } // if (GUI.Button(new Rect(10, 140, 100, 50), "start")) // { // isOpen = true; // lastTime = timeHelper.Now(); // } // GUI.Label(new Rect(10, 200, 200, 20), ((int)(nowTime / 1000)).ToString()); //} }