This command pauses the current movement.



The object stops immediately and does not resume motion until the resume command is issued.

Sample Code

The following code pauses motion of the sphere when the left arrow key is pressed and resumes motion with the resume command when the right arrow key is pressed.

 oworld = New World(); ocamera = New Camera(oworld); sphere = oworld.CreateSphere(50,50,50,25,25); ocamera.MoveBack(1200); //Move the sphere. sphere.MoveDown(500,30); //Loop While(TRUE)  {   //Pause the motion when the left arrow key is pressed.   If(IsKeyDown(Keyboard.LEFT))    {     Sphere.Pause();    }   // Resume motion when the right arrow key is pressed.    If(IsKeyDown(Keyboard.RIGHT))    {     Sphere.Resume();    }   } 

Elementary Game Programming and Simulators Using Jamagic
Elementary Game Programming & Simulations Using Jamagic (Charles River Media Game Development)
ISBN: 1584502614
EAN: 2147483647
Year: 2002
Pages: 105
Authors: Sergio Perez © 2008-2017.
If you may any questions please contact us: