//前後移動,左右轉向
private int Speed_run = 5;
private int Speed_rot = 20;
private void key_hold()
{
if (Input.GetKey(KeyCode.W))
{
transform.Translate(Vector3.forward* Time.deltaTime*Speed_run);
}
if (Input.GetKey(KeyCode.S))
{
transform.Translate(Vector3.back* Time.deltaTime*Speed_run);
}
if (Input.GetKey(KeyCode.A))
{
this.transform.Rotate(Vector3.up * Time.deltaTime * -Speed_rot);
}
if (Input.GetKey(KeyCode.D))
{
this.transform.Rotate(Vector3.up * Time.deltaTime * Speed_rot);
}
}