#pragma strict
var rotationSpeed = 100;
var jumpHeight = 8;
private var isFalling = false;
function Update ()
{
//Handle Ball:Rotation
var rotation : float = Input.GetAxis (“Horizontal”) * rotationSpeed;
rotation *= Time.deltaTime;
GetComponent.().AddRelativeTorque (Vector3.back * rotation);
if (Input.GetKeyDown(KeyCode.W) && isFalling == false )
{
GetComponent.().velocity.y = jumpHeight;
isFalling = true;
}
}
function OnCollisionStay ()
{
isFalling = false;
}
[/code]
Expressions in statements must only be executed for their side effects
Help?