#pragma strict
function Start () {
}
var newobject:Transform;
function Update () {
//Rotate(x,y,z,延着自身的轴进行旋转);下面代码是实现左右旋转
if(Input.GetKey(KeyCode.Q))
{
transform.Rotate(0,-25*Time.deltaTime,0,Space.Self)
}
if(Input.GetKey(KeyCode.W))
{
transform.Rotate(0,25*Time.deltaTime,0,Space.Self)
}
}