home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / de86gnzn / examples / boink / boink.java < prev   
Encoding:
Java Source  |  1996-08-14  |  636 b   |  38 lines

  1. /**
  2.  *
  3.  * Boink.java
  4.  * @author    Mark G. Tacchi (mtacchi@next.com) 
  5.  * @version    1.0
  6.  * Feb 23/1996
  7.  *
  8.  * Create a bunch of bouncy balls.  Cool as ice, and easy as pie!
  9.  *
  10.  */
  11.  
  12. import java.awt.Color;
  13. import com.next.gt.*;
  14.  
  15. public class Boink extends Gamelet {
  16. public void init() {
  17.   super.init();
  18.   //
  19.   // cache images
  20.   //
  21.   new ImageManager(this);  
  22.  
  23.   //
  24.   // Create balls
  25.   //
  26.   for (int i= 0; i< 5; i++) {
  27.      actorManager.addActor (new Ball(this));
  28.   } /*nexti*/ 
  29.  
  30.   //
  31.   // paint background image
  32.   //
  33.   displayManager.setBackgroundTile (getImage(getCodeBase(), "images/background.gif"));
  34. } /*init*/
  35.  
  36.  
  37. } /*Boink*/
  38.