if (Input.GetKeyUp ("space")) { rigidbody2D.velocity = Vector2.zero; rigidbody2D.AddForce (jumpForce); if (rigidbody2D.velocity.y > -0.1 && isFalling == false ) { transform.Rotate (0, Time.deltaTime * 45, 45, Space.World); } else if (rigidbody2D.velocity.y < -0.1){ isFalling = true; transform.Rotate (0, Time.deltaTime * (-45), (-45), Space.World); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)