Game Development Reference
In-Depth Information
levelInScreen.alpha -= .01;
if (levelInScreen.alpha < 0 ) {
dispatchEvent(new Event(EVENT_WAIT_COMPLETE));
levelInScreen.alpha = 0;
}
}
}
}
}
We have made many changes to the Main.as class for Blaster Mines. The screen and sounds are
pretty straightforward and very much like the changes we have made for all of the previous
games. We will spend little time on those and focus on the changes needed to add in the pause,
mute, time-based step timer, FrameRateProfiler , and FrameCounter functionality.
We'll need the following basic screens:
Title screen : Contains a Play button and the text Blaster Mines
Instructions screen : Contains a Start button and the text Shoot everything. Don't get hit. . .
Game-over screen : Contains the text Game Over and a Restart button
And we also need these instances of the BasicScreen class:
Level-in screen : Contains only the text Level plus the level variable
Paused screen : Contains text such as Paused and a button to click to unpause the system
These are the modifications we need to make to the ScoreBoard class:
Score indicator
Level indicator
Shield indicator
Particle pool indicators
Projectile pool indicators
We also need several new constants in the variable definition section for the new scoreBoard
elements and sounds. These are added to the variable definition section:
//custom sccore board elements
public static const SCORE_BOARD_SCORE:String = "score";
public static const SCORE_BOARD_LEVEL:String = "level";
public static const SCORE_BOARD_SHIELD:String = "shield";
public static const SCORE_BOARD_PARTICLE_POOL:String = "particlepool";
public static const SCORE_BOARD_PARTICLE_ACTIVE:String = "particleactive";
public static const SCORE_BOARD_PROJECTILE_POOL:String = "projectilepool";
public static const SCORE_BOARD_PROJECTILE_ACTIVE:String = "projectileactive";
//custom sounds
public static const SOUND_MINE_EXPLODE:String="SoundMineExplode";
public static const SOUND_MUSIC_IN_GAME:String="SoundMusicInGame";
public static const SOUND_MUSIC_TITLE:String="SoundMusicTitle";
public static const SOUND_PLAYER_ENTER:String = "SoundPlayerEnter";
public static const SOUND_PLAYER_EXPLODE:String="SoundPlayerExplode";
public static const SOUND_PLAYER_HIT:String="SoundPlayerHit";
public static const SOUND_PLAYER_SHOOT:String = "SoundPlayerShoot";
Search WWH ::




Custom Search