Skip to content

Instantly share code, notes, and snippets.

@7gano
Last active December 21, 2015 00:18
Show Gist options
  • Save 7gano/6218648 to your computer and use it in GitHub Desktop.
Save 7gano/6218648 to your computer and use it in GitHub Desktop.
importJS(["lib/MOON.js", "lib/enchant.js", "lib/ui.enchant.js", "lib/color.enchant.js",
"lib/stylus.enchant.js", "lib/puppet.enchant.js", "lib/moon.puppet.enchant.js"],
function() {
enchant();
var sticker = Sticker.create();
sticker.onattach = sticker.ondetach = function() {
MOON.finish();
};
sticker.ontap = function() {
var core = new Core(320, 320);
core.preload("images/chara1.png");
core.onload = function(){
var sprite = new Sprite(32, 32);
sprite.image = core.assets["images/chara1.png"];
core.rootScene.addChild(sprite);
};
core.start();
};
sticker.register();
});
@7gano
Copy link
Author

7gano commented Aug 13, 2013

@7gano
Copy link
Author

7gano commented Aug 13, 2013

たぶん
importJS(["lib/MOON.js", "lib/enchant.js", "lib/ui.enchant.js", "lib/color.enchant.js",
"lib/stylus.enchant.js", "lib/puppet.enchant.js", "lib/moon.puppet.enchant.js"],
function() {
がダメだ。

importJS(['lib/MOON.js', 'lib/enchant.js'], function() {

@7gano
Copy link
Author

7gano commented Aug 14, 2013

importJS(["lib/MOON.js", "lib/enchant.js", "lib/ui.enchant.js", "lib/color.enchant.js",
"lib/stylus.enchant.js", "lib/puppet.enchant.js", "lib/moon.puppet.enchant.js"],
function() {
がダメでした。

importJS(['lib/MOON.js', 'lib/enchant.js'], function() {
にしたら動くよ!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment