How can i acess the isFalling boolean in another script and check if its true or false?
#pragma strict
var rotationSpeed = 100;
var jumpHeight = 8;
var isFalling = false;
function Update ()
{
//Handle ball rotation.
var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
rotation *= Time.deltaTime;
rigidbody.AddRelativeTorque (Vector3.back * rotation);
if (Input.GetButton("Jump") && isFalling == false)
{
rigidbody.velocity.y = jumpHeight;
isFalling = true;
}
}
function OnCollisionStay ()
{
isFalling = false;
}