home *** CD-ROM | disk | FTP | other *** search
- package game.controller
- {
- import game.view.AppMediator;
- import game.view.EndGameMediator;
- import game.view.components.EndGameView;
- import org.puremvc.as3.interfaces.ICommand;
- import org.puremvc.as3.interfaces.INotification;
- import org.puremvc.as3.patterns.command.SimpleCommand;
-
- public class EndGameCommand extends SimpleCommand implements ICommand
- {
-
-
- public function EndGameCommand()
- {
- super();
- }
-
- override public function execute(note:INotification) : void
- {
- var appMed:AppMediator = facade.retrieveMediator(AppMediator.NAME) as AppMediator;
- var endGameView:EndGameView = new EndGameView();
- appMed.getViewContainer().addChild(endGameView);
- var endGameMed:EndGameMediator = new EndGameMediator(endGameView);
- endGameMed.initialize(note.getBody() as int);
- facade.registerMediator(endGameMed);
- }
- }
- }
-