Skip to content

Instantly share code, notes, and snippets.

@junishitsuka
Created May 30, 2015 01:43
Show Gist options
  • Select an option

  • Save junishitsuka/0a3ad47470c0e54187cc to your computer and use it in GitHub Desktop.

Select an option

Save junishitsuka/0a3ad47470c0e54187cc to your computer and use it in GitHub Desktop.
$ 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
<script type="text/javascript" src="enchant.js"></script>
// 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