Game Development Reference
In-Depth Information
public function JigsawGameScreen() {
super();
}
public override function init():void {
super.init();
// initialize the masks
Mask.init();
// create the minimap
m_miniMap = new MiniMap();
// Init the PuzzlePix
m_pp = new PuzzlePix();
m_displayManager = new DisplayManager();
}
public override function show():void {
super.show();
addChild(m_miniMap);
addChild(m_pp);
addChild(m_displayManager);
}
public override function hide():void {
super.hide();
m_displayManager.clearAll();
m_miniMap.clear();
removeChild(m_miniMap);
m_pp.removeFromStage();
removeChild(m_pp);
removeChild(m_displayManager);
}
public override function startGame():void {
super.startGame();
startPuzzle();
}
private function startPuzzle():void {
var img:BitmapAsset = null;
img = new MLClass() as BitmapAsset;
m_displayManager.startPuzzle(img.bitmapData);
setupStage(img);
}
private function setupStage(img:BitmapAsset):void {
m_pp.init(img.bitmapData);
m_miniMap.init(img);
}
}
}
 
Search WWH ::




Custom Search