!!!第15回の予定 ![[11班トップページ|18::gr11]] enchant(); GAME_WIDTH = 1280; GAME_HEIGHT = 800; GAME_FPS = 30; const RED_BOX = "red_box.png"; const BLUE_BOX = "blue_box.png"; window.onload = function() { let game = new Game(GAME_WIDTH, GAME_HEIGHT); game.fps = GAME_FPS; game.preload(RED_BOX, BLUE_BOX); game.onload = function() { let gamecore = enchant.Core.instance; let box1 = new Sprite(100, 100); box1.image = gamecore.assets[RED_BOX]; box1.x = 100; box1.y = 100; gamecore.currentScene.addChild(box1); let box2 = new Sprite(100, 100); box2.image = gamecore.assets[BLUE_BOX]; box2.x = 150; box2.y = 150; gamecore.currentScene.addChild(box2); gamecore.currentScene.insertBefore(box2, box1); }; game.start(); };