Created
May 30, 2015 01:43
-
-
Save junishitsuka/0a3ad47470c0e54187cc to your computer and use it in GitHub Desktop.
enchant.js入門 ref: http://qiita.com/junishitsuka/items/8c27ecc68b0bac9e8574
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ mkdir game | |
| $ cp enchant.js-builds-0.8.2-b/build/enchant.js game | |
| $ cp enchant.js-builds-0.8.2-b/images/chara1.png game | |
| $ cp enchant.js-builds-0.8.2-b/examples/beginner/hellobear/index.html game |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript" src="enchant.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // this.tl.moveBy(縦の移動距離, 横の移動距離, アニメーションのフレーム数) | |
| this.tl.moveBy(rand(100), 0, 40, enchant.Easing.BOUNCE_EASEOUT) | |
| .moveBy(-rand(100), -rand(20), rand(20)) | |
| .fadeOut(20) | |
| .fadeIn(10) | |
| .loop(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment