patrickc

Untitled

Aug 2nd, 2011
74
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.     try
  8.     {
  9.         if (!params)
  10.         {
  11.             if (mainStageController)
  12.             {
  13.                 mainStageController.popScenesTo('change-log');
  14.                 mainStageController.activate();
  15.             }
  16.             else if (true) {
  17.                 this.controller.createStageWithCallback({name: 'mainStage', lightweight: true}, this.launchScene.bind(this));
  18.             }
  19.             else
  20.             {
  21.                 this.controller.createStageWithCallback({name: 'stageAassistant', assistantName: "StageAssistant", lightweight: true});
  22.             }
  23.         }
  24.     }
  25.     catch (e)
  26.     {
  27.         Mojo.Log.logException(e, "AppAssistant#handleLaunch");
  28.     }
  29. };
  30.  
  31. AppAssistant.prototype.launchScene = function(controller)
  32. {
  33.     controller.pushScene('change-log');
  34. };
  35.  
  36. // Local Variables:
  37. // tab-width: 4
  38. // End:
Add Comment
Please, Sign In to add comment