Skip to content

Instantly share code, notes, and snippets.

@tadamatu
Last active October 21, 2015 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadamatu/7f4b2f2e1fc7349e4c5e to your computer and use it in GitHub Desktop.
Save tadamatu/7f4b2f2e1fc7349e4c5e to your computer and use it in GitHub Desktop.
【cocos2d-x】物理エンジンの重力を変更したらモンストも作れるぞ! ref: http://qiita.com/tadamatu/items/df7e9ad060462936fcde
// 固定された物体(壁などに利用)
auto map = this->addNewBoxAtPosition(this, Point(0, 100), false, "map.png");
// 物理計算されてダイナミックに動く物体(プレイヤーなどに利用)
auto player = this->addNewBoxAtPosition(this, Point(100, 100), true, "player.png");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment