These commands remove an object from view (it still exists, but is invisible), and then make it visible again.




Sample Code

The following code hides the sphere when the left arrow is pressed and makes it visible again when the right arrow is pressed.

 oworld = New World(); ocamera = New Camera(oworld); sphere = oworld.CreateSphere(50,50,50,25,25); ocamera.MoveBack(1200); ocamera.Walk(); sphere.AddPosition(100,200,30,5); //Move it in 5 seconds. //Loop While(1) {  If(IsKeyDown(Keyboard.LEFT)) //Hides when left arrow is                              //pressed.   {   Sphere.hide();   }  If(IsKeyDown(Keyboard.RIGHT))// Reappears when right arrow                               // is pressed.   {   Sphere.Show();   } } 

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

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net