main.js 505 B

1234567891011121314151617181920212223242526272829
  1. // This script is the main entry point of the game
  2. require("AtomicGame");
  3. Atomic.game.init(start, update);
  4. // called at the start of play
  5. function start() {
  6. var game = Atomic.game;
  7. // create a 2D scene
  8. game.createScene2D();
  9. // create the game component
  10. var node = game.scene.createChild("Imp");
  11. TheImp = node.createJSComponent("Imp");
  12. var uiNode = game.scene.createChild("UI");
  13. uiNode.createJSComponent("UI");
  14. }
  15. // called per frame
  16. function update(timeStep) {
  17. }