Game Development Reference
In-Depth Information
case FrameWorkStates.STATE_SYSTEM_TITLE:
systemFunction = systemTitle;
break;
case FrameWorkStates.STATE_SYSTEM_INSTRUCTIONS:
systemFunction = systemInstructions;
break;
case FrameWorkStates.STATE_SYSTEM_NEW_GAME:
systemFunction = systemNewGame;
break;
case FrameWorkStates.STATE_SYSTEM_NEW_LEVEL:
systemFunction = systemNewLevel;
break;
case FrameWorkStates.STATE_SYSTEM_LEVEL_IN:
systemFunction = systemLevelIn;
break;
case FrameWorkStates.STATE_SYSTEM_GAME_PLAY:
systemFunction = systemGamePlay;
break
case FrameWorkStates.STATE_SYSTEM_GAME_OVER:
systemFunction = systemGameOver;
break;
}
}
public function systemTitle():void {
addChild(titleScreen);
titleScreen.addEventListener(CustomEventButtonId.BUTTON_ID,
okButtonClickListener, false, 0, true);
switchSystemState(FrameWorkStates.
STATE_SYSTEM_WAIT_FOR_CLOSE);
nextSystemState = FrameWorkStates.STATE_SYSTEM_INSTRUCTIONS;
}
public function systemInstructions():void {
addChild(instructionsScreen);
instructionsScreen.addEventListener(CustomEventButtonId.
BUTTON_ID,okButtonClickListener, false, 0, true);
switchSystemState(FrameWorkStates.
STATE_SYSTEM_WAIT_FOR_CLOSE);
nextSystemState = FrameWorkStates.STATE_SYSTEM_NEW_GAME;
}
public function systemNewGame():void {
addChild(game);
Search WWH ::




Custom Search