Guest User

Untitled

a guest
Jul 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. override public function startup() : void
  2. {
  3. // we need to start something manually
  4. var game:Game = new Game();
  5.  
  6. // Views
  7. viewMap.mapPackage("app.view");
  8.  
  9. // Controllers
  10. injector.mapSingleton(GameMovement);
  11. injector.mapValue(Game, game);
  12.  
  13. // Models
  14. injector.mapSingleton(GreenPlayer);
  15. injector.mapSingleton(RedPlayer);
  16.  
  17. // Other
  18. injector.mapValue(Stage, contextView.stage);
  19.  
  20. // start the game
  21. injector.injectInto(game);
  22. }
Add Comment
Please, Sign In to add comment