main.js 420 B

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