patrickc

Untitled

Aug 2nd, 2011
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function AppAssistant() {}
  2.  
  3. AppAssistant.prototype.handleLaunch = function(params)
  4. {
  5.     var mainStageController = this.controller.getStageController('mainStage');
  6.  
  7.     this.controller.createStageWithCallback({name: 'stageAassistant', assistantName: "StageAssistant", lightweight: true}, this.launchScene.bind(this));
  8.    
  9.     try
  10.     {
  11.         if (!params)
  12.         {
  13.             if (mainStageController)
  14.             {
  15.                 mainStageController.popScenesTo('main');
  16.                 mainStageController.activate();
  17.             }
  18.             else
  19.              {
  20.                 this.controller.createStageWithCallback({name: 'mainStage', lightweight: true}, this.launchScene.bind(this));
  21.             }
  22.         }
  23.     }
  24.     catch (e)
  25.     {
  26.         Mojo.Log.logException(e, "AppAssistant#handleLaunch");
  27.     }
  28. };
  29.  
  30. AppAssistant.prototype.launchScene = function(controller)
  31. {
  32.     controller.pushScene('change-log');
  33. };
  34.  
  35. // Local Variables:
  36. // tab-width: 4
  37. // End:
Add Comment
Please, Sign In to add comment