main.js 384 B

123456789101112131415161718192021222324
  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. var uiNode = game.scene.createChild("UI");
  10. uiNode.createJSComponent("UI");
  11. }
  12. // called per frame
  13. function update(timeStep) {
  14. }