mirror of
https://github.com/wassname/phaser.git
synced 2026-07-19 11:26:26 +08:00
1.1.6 release. The final of the 1.1 branch.
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@
|
||||
var Phaser = Phaser || {
|
||||
|
||||
VERSION: '<%= version %>',
|
||||
DEV_VERSION: '1.1.5',
|
||||
DEV_VERSION: '1.1.6',
|
||||
GAMES: [],
|
||||
|
||||
AUTO: 0,
|
||||
|
||||
@@ -696,14 +696,8 @@ Phaser.Physics.Arcade.prototype = {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._mapData.length > 1)
|
||||
for (var i = 0; i < this._mapData.length; i++)
|
||||
{
|
||||
this.separateTiles(sprite.body, this._mapData);
|
||||
}
|
||||
else
|
||||
{
|
||||
var i = 0;
|
||||
|
||||
if (this.separateTile(sprite.body, this._mapData[i]))
|
||||
{
|
||||
// They collided, is there a custom process callback?
|
||||
@@ -731,6 +725,8 @@ Phaser.Physics.Arcade.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -863,32 +859,6 @@ Phaser.Physics.Arcade.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* The core separation function to separate a physics body and an array of tiles.
|
||||
* @method Phaser.Physics.Arcade#separateTiles
|
||||
* @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.
|
||||
* @param {array<Phaser.Tile>} tiles - The array of tiles to collide against.
|
||||
* @returns {boolean} Returns true if the body was separated, otherwise false.
|
||||
*/
|
||||
separateTiles: function (body, tiles) {
|
||||
|
||||
var tile;
|
||||
var result = false;
|
||||
|
||||
for (var i = 0; i < tiles.length; i++)
|
||||
{
|
||||
tile = tiles[i];
|
||||
|
||||
if (this.separateTile(body, tile))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* The core separation function to separate a physics body and a tile.
|
||||
* @method Phaser.Physics.Arcade#separateTile
|
||||
|
||||
@@ -501,8 +501,7 @@ Phaser.Physics.Arcade.Body.prototype = {
|
||||
this.speed = 0;
|
||||
}
|
||||
|
||||
// Don't bother if speed 0
|
||||
if (this.speed > 0)
|
||||
if (this.speed > 0 || !this.velocity.isZero())
|
||||
{
|
||||
this.velocity.x = Math.cos(this.angle) * this.speed;
|
||||
this.velocity.y = Math.sin(this.angle) * this.speed;
|
||||
|
||||
Reference in New Issue
Block a user