The Bug Starts RunningBugRunner fixes the frame rate to be 40 FPS; anything faster makes it almost impossible to move the ant quickly enough to intercept a dropping ball. The application's constructor loads and starts the BladeRunner sequence:
Since BugRunner plays one sequence at a time, it's loaded directly via a call to load( ) rather than being specified in a MIDI information file. MidisLoader assumes the sequence is in the Sounds/ subdirectory.
BugRunner sets up window listener methods for pausing and resuming the game in a similar manner to the WormChase application in Chapter 3. windowClosing( ) is different:
The call to close( ) in MidisLoader ensures the sequence is stopped at termination time. |
Tuesday, January 19, 2010
The Bug Starts Running
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment