c#版本如下:在start和update的中间:public int speed = 5;
public GameObject newobject;
public int sdshu=0;
public int xmshu=0;
在Update里:float x = Input.GetAxis("Horizontal")*Time.deltaTime*speed;
float z = Input.GetAxis("Vertical")*Time.deltaTime*speed;
transform.Translate(x,0,z);//上下左右移动功能
承担因您的行为而导致的法律责任,
本站有权保留或删除有争议评论。
参与本评论即表明您已经阅读并接受
上述条款。