ToggleGravity

Author: Jonathan Czeck (aarku)

Description
This script illustrates how to toggle some property by clicking the mouse button. The script waits for the left mouse button to be pressed down. When this occurs, two courses of action can be taken dependant on the state of the gravityOn variable. If the gravity is currently on, save the gravity value in a variable, set the global gravity to zero, and change the state of gravityOn to false. If the gravity is currently off, restore the global gravity setting and set the state of the gravityOn variable to true.

Usage
Place this script on any GameObject in your scene. Logically it should go on a master control GameObject named something like "GameController."