Game Development Reference
In-Depth Information
public static const SPRITE_LIVES:int = 8;
private var playerFrames:Array;
private var enemyFrames:Array;
private var explodeFrames:Array;
private var tileSheetData:Array;
private var missileTiles:Array=[];
private var explodeSmallTiles:Array;
private var explodeLargeTiles:Array;
private var ammoFrame:int;
private var livesFrame:int;
private var goalFrame:int;
//the map definition
private var tileWidth:int = 32;
private var tileHeight:int = 32;
private var mapRowCount:int = 15;
private var mapColumnCount:int = 20;
//levels
private var level:int = 1;
private var levelTileMap:Array;
private var levelData:Level;
private var levels:Array = [undefined,new Level1()];
//full screen blit
private var canvasBitmapData:BitmapData=new BitmapData(tileWidth * É
mapColumnCount, tileHeight * mapRowCount, true, 0x00000000);
private var canvasBitmap:Bitmap = new Bitmap(canvasBitmapData);
private var blitPoint:Point = new Point();
private var tileBlitRectangle:Rectangle = new Rectangle(0, 0, É
tileWidth, tileHeight);
//***** Flex *****
private var tileSheet:TileSheet= new TileSheet(new É
Library.TankSheetPng().bitmapData,tileWidth, tileHeight);
//***** End Flex *****
//***** Flash IDE *****
//private var tileSheet:TileSheet = new TileSheet(new É
TankSheetPng(0,0), tileWidth, tileHeight);
//***** End Flash IDE *****
If you are using the Flash IDE, you will want to comment out the Flex line above and uncomment
the Flash line for instantiating the TileSheet instance.
Let's take a look a quick look at these variables. We will go into detail on their use very soon, but
it won't hurt to discuss them briefly here.
Search WWH ::




Custom Search