Skip to content

Instantly share code, notes, and snippets.

@naosim
Created March 25, 2014 06:13
Show Gist options
  • Save naosim/9756083 to your computer and use it in GitHub Desktop.
Save naosim/9756083 to your computer and use it in GitHub Desktop.
enchantの初期状態をサクっと作るスクリプト (プロジェクトテンプレート)
mkdir js css img
echo "download image"
cd img
curl -s -f -L https://raw.github.com/uei/enchant.js-builds/master/images/chara1.png -O
cd ..
echo "download enchant.js"
cd js
curl -s -f -L https://raw.github.com/uei/enchant.js-builds/master/build/enchant.min.js -O
echo "create main.js"
echo "enchant();
var game = new Core(320, 320); // game stage
game.fps = 30;
game.onload = function(){
var label = new Label('test');
game.rootScene.addChild(label);
};
game.start();">main.js
cd ..
echo "create index.html"
echo '<!DOCTYPE html>
<html lang="ja">
<head><script src="js/enchant.min.js"></script></head>
<body>
<script src="js/main.js"></script>
</body>
</html>'>index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment