ผลต่างระหว่างรุ่นของ "01219245/cocos2d/Platform1"

จาก Theory Wiki
ไปยังการนำทาง ไปยังการค้นหา
แถว 19: แถว 19:
  
 
== Example code ==
 
== Example code ==
 +
 +
[[Image:Cocos-jumper-platform.png]]
 +
 +
* [https://bitbucket.org/jittat/cocos2d-html5-jump git repo at Bitbucket]

รุ่นแก้ไขเมื่อ 05:17, 26 กุมภาพันธ์ 2557

This is part of 01219245.

This guide is very short. It only discuss various techniques in implementing platform games.

Here are a few useful links:

Collision detection: cc.Rect

Previously, we have implemented our own collision detection routine. However, Cocos2d-html5 has provided us with a few nice collision detection tools.

Bounding boxes and world co-ordinates

Intersection

Falling on top

Example code

Cocos-jumper-platform.png