var speed = 5.0;
function Update () {
var x = Input.GetAxis("Horizontal") * Time.deltaTime * speed;
var z = Input.GetAxis("Vertical") * Time.deltaTime * speed; transform.Translate(x, 0, z);
}
// Loads the level named "SomeLevel" as a response
// to the user clicking on the object
function OnMouseDown () { Application.LoadLevel ("SomeLevel"); }
// Fades the red component of the material to zero
// while the mouse is over the mesh
function OnMouseOver () { renderer.material.color.r -= 0.1 * Time.deltaTime; } 作者: Zack 时间: 2012-12-5 19:55
顶一个,支持楼主的教程! 作者: 王者再临 时间: 2012-12-5 22:16
很不错的内容,保存了! 作者: 艾西格亚 时间: 2012-12-6 02:29
很值得给学习者的参考资料! 作者: 其实我是神 时间: 2012-12-8 08:13 作者: 王者再临 时间: 2012-12-27 21:24 本帖最后由 艾西格亚 于 2013-5-7 12:50 编辑