Tilemap.createCollisionObjects will parse Tiled data for objectgroups and convert polyline instances into physics objects you can collide with in the world.

After defining tiles that collide on a Tilemap, you need to call Tilemap.generateCollisionData(layer) to populate the physics world with the data required.
Debug.renderPhysicsBody updated to take camera location and body rotation into account.
Body movement functions put back to velocity :)
Updated to latest dev version of pixi and latest p2.js
Updated docs
This commit is contained in:
photonstorm
2014-02-18 03:01:51 +00:00
parent 375e9e379a
commit 5d5c64d22f
201 changed files with 41296 additions and 47048 deletions
+49 -23
View File
@@ -58,6 +58,10 @@
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
<li>
<a href="Phaser.BitmapFont.html">BitmapFont</a>
</li>
<li>
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
@@ -90,10 +94,6 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -142,6 +142,10 @@
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
<li>
<a href="Phaser.Ellipse.html">Ellipse</a>
</li>
<li>
<a href="Phaser.Events.html">Events</a>
</li>
@@ -250,10 +254,6 @@
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
<li>
<a href="Phaser.Plugin.html">Plugin</a>
</li>
@@ -314,6 +314,10 @@
<a href="Phaser.Sprite.html">Sprite</a>
</li>
<li>
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
</li>
<li>
<a href="Phaser.Stage.html">Stage</a>
</li>
@@ -412,6 +416,10 @@
<a href="global.html#canUseNewCanvasBlendModes">canUseNewCanvasBlendModes</a>
</li>
<li>
<a href="global.html#getBounds">getBounds</a>
</li>
<li>
<a href="global.html#getNextPowerOfTwo">getNextPowerOfTwo</a>
</li>
@@ -2162,7 +2170,7 @@
<div class="description">
<p>Checks i a given phaser state is valid.
<p>Checks if a given phaser state is valid.
State must exist and have at least one callback function registered..</p>
</div>
@@ -2245,7 +2253,7 @@ State must exist and have at least one callback function registered..</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-282">line 282</a>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-283">line 283</a>
</li></ul></dd>
@@ -2337,7 +2345,7 @@ State must exist and have at least one callback function registered..</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-500">line 500</a>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-502">line 502</a>
</li></ul></dd>
@@ -2406,7 +2414,7 @@ State must exist and have at least one callback function registered..</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-381">line 381</a>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-383">line 383</a>
</li></ul></dd>
@@ -2535,7 +2543,7 @@ State must exist and have at least one callback function registered..</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-321">line 321</a>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-322">line 322</a>
</li></ul></dd>
@@ -2600,7 +2608,7 @@ State must exist and have at least one callback function registered..</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-392">line 392</a>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-394">line 394</a>
</li></ul></dd>
@@ -2665,7 +2673,7 @@ State must exist and have at least one callback function registered..</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-410">line 410</a>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-412">line 412</a>
</li></ul></dd>
@@ -2730,7 +2738,7 @@ State must exist and have at least one callback function registered..</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-456">line 456</a>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-458">line 458</a>
</li></ul></dd>
@@ -2913,7 +2921,7 @@ State must exist and have at least one callback function registered..</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-469">line 469</a>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-471">line 471</a>
</li></ul></dd>
@@ -2978,7 +2986,7 @@ State must exist and have at least one callback function registered..</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-423">line 423</a>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-425">line 425</a>
</li></ul></dd>
@@ -3014,7 +3022,7 @@ State must exist and have at least one callback function registered..</p>
<div class="description">
<p>Start the given state</p>
<p>Start the given State. If a State is already running then State.shutDown will be called (if it exists) before switching to the new State.</p>
</div>
@@ -3040,6 +3048,8 @@ State must exist and have at least one callback function registered..</p>
<th>Default</th>
<th class="last">Description</th>
</tr>
@@ -3073,6 +3083,10 @@ State must exist and have at least one callback function registered..</p>
<td class="default">
</td>
<td class="description last"><p>The key of the state you want to start.</p></td>
</tr>
@@ -3106,8 +3120,14 @@ State must exist and have at least one callback function registered..</p>
<td class="default">
true
</td>
<td class="description last"><p>clear everything in the world? (Default to true)</p></td>
<td class="description last"><p>Clear everything in the world? This clears the World display list fully (but not the Stage, so if you've added your own objects to the Stage they will need managing directly)</p></td>
</tr>
@@ -3139,8 +3159,14 @@ State must exist and have at least one callback function registered..</p>
<td class="default">
false
</td>
<td class="description last"><p>clear asset cache? (Default to false and ONLY available when clearWorld=true)</p></td>
<td class="description last"><p>Clear the Game.Cache? This purges out all loaded assets. The default is false and you must have clearWorld=true if you want to clearCache as well.</p></td>
</tr>
@@ -3237,7 +3263,7 @@ State must exist and have at least one callback function registered..</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-436">line 436</a>
<a href="StateManager.js.html">core/StateManager.js</a>, <a href="StateManager.js.html#sunlight-1-line-438">line 438</a>
</li></ul></dd>
@@ -3288,7 +3314,7 @@ State must exist and have at least one callback function registered..</p>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Sat Feb 08 2014 07:19:51 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Tue Feb 18 2014 03:01:26 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>