home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-04-15 | 1.0 KB | 52 lines |
- /**
- *
- * Boink.java
- * @author Mark G. Tacchi (mtacchi@next.com)
- * @version 1.0
- * Feb 23/1996
- *
- * Create a bunch of bouncy balls. Cool as ice, and easy as pie!
- *
- */
-
- import java.awt.Color;
- import java.awt.Frame;
- import com.next.gt.*;
-
- public class Boink extends Gamelication {
- public void init() {
- super.init( 320,240 );
- Frame f = new Frame( "Gamelication" );
- f.setSize( 320, 240 );
- f.add( this );
- f.addWindowListener( new WindowDestroyer( f, this ) );
- f.addComponentListener( new WindowResizer( displayManager, this ) );
- f.setResizable( true );
- f.show();
- //
- // cache images
- //
- new ImageManager(this);
-
- //
- // Create balls
- //
- for (int i= 0; i< 12; i++) {
- actorManager.addActor (new Ball(this));
- } /*init*/
-
- //
- // paint background image
- //
- displayManager.setBackgroundTile (getImage( getCodeBase(), "images/background.gif"));
- start();
- run();
- } /*init*/
-
- public static void main( String[] args ) {
- Boink gamelication = new Boink();
- gamelication.init();
- }
-
- } /*Boink*/
-