Game Development Reference
In-Depth Information
private var customScoreBoardEventShield:CustomEventScoreBoardUpdate = new
CustomEventScoreBoardUpdate(CustomEventScoreBoardUpdate.UPDATE_TEXT,
Main.SCORE_BOARD_SHIELD, "");
private var customScoreBoardEventLevel:CustomEventScoreBoardUpdate= new
CustomEventScoreBoardUpdate(CustomEventScoreBoardUpdate.UPDATE_TEXT,
Main.SCORE_BOARD_LEVEL, "");
private var customScoreBoardEventParticlePool:CustomEventScoreBoardUpdate = new
CustomEventScoreBoardUpdate(CustomEventScoreBoardUpdate.UPDATE_TEXT,
Main.SCORE_BOARD_PARTICLE_POOL,"");
private var customScoreBoardEventParticleActive:CustomEventScoreBoardUpdate = new
CustomEventScoreBoardUpdate(CustomEventScoreBoardUpdate.UPDATE_TEXT,
Main.SCORE_BOARD_PARTICLE_ACTIVE,"");
private var customScoreBoardEventProjectilePool:CustomEventScoreBoardUpdate =
new CustomEventScoreBoardUpdate(CustomEventScoreBoardUpdate.UPDATE_TEXT,
Main.SCORE_BOARD_PROJECTILE_POOL, "");
private var customScoreBoardEventProjectileActive:CustomEventScoreBoardUpdate =
new CustomEventScoreBoardUpdate(CustomEventScoreBoardUpdate.UPDATE_TEXT,
Main.SCORE_BOARD_PROJECTILE_ACTIVE, "");
//math look up tables
//private var rotationVectorList:Array = [];
private var rotationVectorList:Vector.<Point>=new Vector.<Point>(360,false);
//radar
private var radarBitmap:Bitmap = new Bitmap(canvasBitmapData);
public function BlasterMines() {
trace("constructor");
init();
}
}
}
The variable declaration section is very similar to the others you have seen so far in this topic.
We have broken it up into sections for easier digestion. We have also discussed many of them
previously in the preceding sections of this chapter. As we progress through the rest of the code
for the BlasterMines.as class, we will discuss new concepts in detail and briefly go over any that
we have not previously covered in this or preceding chapters.
Adding the Blaster Mines game init functions
The BlasterMines.as init functions set up the class for all games that will be played during this
session. It includes the render profile setup code, as well as functions to create the ship assets,
projectile assets, and the pool of projectile objects.
First, we will look at the setRendering function. We have discussed this briefly a few times earlier
in this chapter:
Search WWH ::




Custom Search