using UnityEngine;
using System.Collections;
public class MathfLerp : MonoBehaviour {
public float from = 0.0F;
public float to = 6.0F;
// Update is called once per frame
void Update () {
//当t=0返回from, 当t=1返回to, 当t>0 and t<1 返回from+(to-from)*t的值。
transform.position = new Vector3(Mathf.Lerp(from, to, Time.time), 0, 0);
}
}