Game Development Reference
In-Depth Information
setApplicationBackGround(600, 400, false, 0x000000);
//add score board to the screen as the second layer
scoreBoard = new ScoreBoard();
addChild(scoreBoard);
scoreBoardTextFormat = new TextFormat("_sans", "11", "0xffffff", "true");
scoreBoard.createTextElement(SCORE_BOARD_SCORE, new SideBySideScoreElement(450,
100, 20, "Score", scoreBoardTextFormat, 25, "0", scoreBoardTextFormat));
scoreBoard.createTextElement(SCORE_BOARD_LEVEL, new SideBySideScoreElement(450,
120, 20, "Level", scoreBoardTextFormat, 25, "0", scoreBoardTextFormat));
scoreBoard.createTextElement(SCORE_BOARD_SHIELD, new SideBySideScoreElement(450,
140, 20, "Shield", scoreBoardTextFormat, 25, "0", scoreBoardTextFormat));
scoreBoard.createTextElement(SCORE_BOARD_PARTICLE_POOL, new
SideBySideScoreElement(450, 160, 20, "PartPool", scoreBoardTextFormat,
50, "0", scoreBoardTextFormat));
scoreBoard.createTextElement(SCORE_BOARD_PARTICLE_ACTIVE, new
SideBySideScoreElement(450, 170, 20, "PartActive", scoreBoardTextFormat,
50, "0", scoreBoardTextFormat));
scoreBoard.createTextElement(SCORE_BOARD_PROJECTILE_POOL, new `CCC
SideBySideScoreElement(450, 180, 20, "ProjPool", scoreBoardTextFormat,
50, "0", scoreBoardTextFormat));
scoreBoard.createTextElement(SCORE_BOARD_PROJECTILE_ACTIVE, new
SideBySideScoreElement(450, 190, 20, "ProjActive", scoreBoardTextFormat,
50, "0", scoreBoardTextFormat));
//screen text initializations
screenTextFormat = new TextFormat("_sans", "16", "0xffffff", "false");
screenTextFormat.align = flash.text.TextFormatAlign.CENTER;
screenButtonFormat = new TextFormat("_sans", "12", "0x000000", "false");
titleScreen = new BasicScreen(FrameWorkStates.STATE_SYSTEM_TITLE,400,400,
false,0x000000 );
titleScreen.createOkButton("Play", new Point(150, 250), 100, 20,
screenButtonFormat, 0x000000, 0xff0000,2);
titleScreen.createDisplayText("Blaster Mines", 200, new Point(100, 150),
screenTextFormat);
instructionsScreen = new BasicScreen(FrameWorkStates.STATE_SYSTEM_INSTRUCTIONS,
400,400,false,0x000000);
instructionsScreen.createOkButton("Start", new Point(150, 250), 100, 20,
screenButtonFormat, 0x000000, 0xff0000,2);
Search WWH ::




Custom Search