Game Development Reference
In-Depth Information
gameOverScreen.createOkButton("Game Over", new Point(250, 250), 100, 20,
screenButtonFormat, 0x000000, 0xff0000,2);
gameOverScreen.createDisplayText("Submit",100,new Point(250,150),screenTextFormat);
levelInScreen = new BasicScreen(FrameWorkStates.STATE_SYSTEM_LEVEL_IN,
600, 400, true, 0xbbff0000);
levelInText = "GO!";
levelInScreen.createDisplayText(levelInText,100,new
Point(250,150),screenTextFormat);
pausedScreen = new BasicScreen(FrameWorkStates.STATE_SYSTEM_PAUSE,
400,400,false,0xff000000 );
pausedScreen.createOkButton("UNPAUSE", new Point(250, 250), 100, 20,
screenButtonFormat, 0x000000, 0xff0000,2);
pausedScreen.createDisplayText("Puased", 100, new Point(250, 150),
screenTextFormat);
preloadScreen = new BasicScreen(FrameWorkStates.STATE_SYSTEM_PRELOAD,
600, 400, true, 0xff0000ff);
//*** Flex SDK Only. Comment out these lines if using the IDE.
soundManager.addSound(SOUND_IN_GAME_MUSIC, new Library.SoundMusicInGame);
soundManager.addSound(SOUND_TITLE_MUSIC,new Library.SoundMusicTitle);
soundManager.addSound(SOUND_EXPLODE,new Library.SoundExplode);
//preloadScreen not needed for Flex SDK projects
preloadScreen.createDisplayText("Loading...",150,new
Point(250,150),screenTextFormat);
//set initial game state
switchSystemState(FrameWorkStates.STATE_SYSTEM_MOCHI_AD);
//sounds added after pre-load in the addSounds() function
//mochi
mochiGameId = "81e8cd4f0999371e";
mochiBoardId = "ffe2de0ae221a7f4";
MochiServices.connect(mochiGameId, this);
//framerate profiler
frameRate = 40;
frameRateProfiler = new FrameRateProfiler();
frameRateProfiler.profilerRenderObjects = 4000;
frameRateProfiler.profilerRenderLoops = 7;
frameRateProfiler.profilerDisplayOnScreen= true;
frameRateProfiler.profilerXLocation = 0;
frameRateProfiler.profilerYLocation = 0;
addChild(frameRateProfiler);
frameRateProfiler.startProfile(frameRate);
frameRateProfiler.addEventListener(FrameRateProfiler.EVENT_COMPLETE,
frameRateProfileComplete, false, 0, true);
}
Search WWH ::




Custom Search