====== 003 スプライトの表示 ====== {{:wiki:enchant.js:tips:enchantjs_003_000.png?200|}} ===== 概要 ===== スプライトを表示します。 ==== ソースコード ==== // main.js function preloadAssets() { game = new Game(320,480); game.onload = init; game.start(); } function init() { game.scale = 1; game.fps = 30; scene = new Scene(); scene.backgroundColor = "#000"; game.pushScene(scene); sprite = new Sprite(64, 64); sprite.backgroundColor = "#66F"; sprite.x = 32; sprite.y = 32; scene.addChild(sprite); main(); } ==== ダウンロード ==== {{:wiki:enchant.js:tips:enchantjs_std_sprite.zip|}}