学着编写的脚本,第一次测试通过,但后面就一直说没通过,没有改动过,请教是什么原因。
脚本很简单
using UnityEngine;
using System.Collections;
public class shoot1c : MonoBehaviour {
// Use this for initialization
void Start () {
}
int speed=5;
// Update is called once per frame
void Update () {
float x=Input.GetAxis("Horizontal")*Time.deltaTime*speed;
float z=Input.GetAxis("Vertical")*Time.deltaTime*speed;
transform.Translate(x,0,z);
print(x,z);
}
}
脚本很简单
using UnityEngine;
using System.Collections;
public class shoot1c : MonoBehaviour {
// Use this for initialization
void Start () {
}
int speed=5;
// Update is called once per frame
void Update () {
float x=Input.GetAxis("Horizontal")*Time.deltaTime*speed;
float z=Input.GetAxis("Vertical")*Time.deltaTime*speed;
transform.Translate(x,0,z);
print(x,z);
}
}