unity3D中用js实现物体的旋转、移动
摘要:
#pragma strictvar TranslaSpeed=20;var RotateSpeed=1000;function Start () {}function Update () {}function OnGUI(){GUI.backgroundColor=Color.red;if(GUI.Button(Rect(10,10,70,30),"向左旋转")){transform.Rotate(Vector3.up*Time.deltaTime*(-RotateSpeed));}if(GUI.Button(Rect(90,10,70,30),"向前移动&quo 阅读全文
posted @ 2014-04-09 13:32 连一粝 阅读(579) 评论(0) 推荐(0) 编辑