O'Reilly logo

Java™ ME Game Programming, Second Edition by Ph.D. Martin J. Wells, Ph.D. John P. Flynt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

GameStart

The GameStart class provides a way to control how the user enters into the event context that the GSCanvas class provides. It furnishes a splash screen, a game-over screen, and commands for starting and stopping the application. When the user presses the Start key, the GameStart class constructs an instance of the GSCanvas class and moves the context of interaction into the event arena defined by Canvas class methods. You can find the code for the GameStart and GSCanvas classes in the Chapter 13 source folder. The classes are included in the NetBeans Chapter13MIDlets project and also in the standalone folder. Here is the code for the GameStart class. The GSCanvas class is presented further along in this chapter.

/* * Chapter 13 \ GameStart.java ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required