mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
Apparently I didn't fix them the first time
This commit is contained in:
parent
6d7b84b10e
commit
6df44bd21a
1 changed files with 26 additions and 26 deletions
|
@ -730,38 +730,38 @@ Phaser.Weapon.prototype.fire = function (from, x, y) {
|
|||
}
|
||||
else if (this.trackedSprite)
|
||||
{
|
||||
if (this.trackRotation)
|
||||
{
|
||||
var rotatedPoint = new Phaser.Point(this.trackedSprite.world.x + this.trackOffset.x, this.trackedSprite.world.y + this.trackOffset.y);
|
||||
rotatedPoint.rotate(this.trackedSprite.world.x, this.trackedSprite.world.y, this.trackedSprite.rotation);
|
||||
|
||||
if (this.fireFrom.width > 1)
|
||||
if (this.trackRotation)
|
||||
{
|
||||
this.fireFrom.centerOn(rotatedPoint.x, rotatedPoint.y);
|
||||
var rotatedPoint = new Phaser.Point(this.trackedSprite.world.x + this.trackOffset.x, this.trackedSprite.world.y + this.trackOffset.y);
|
||||
rotatedPoint.rotate(this.trackedSprite.world.x, this.trackedSprite.world.y, this.trackedSprite.rotation);
|
||||
|
||||
if (this.fireFrom.width > 1)
|
||||
{
|
||||
this.fireFrom.centerOn(rotatedPoint.x, rotatedPoint.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.fireFrom.x = rotatedPoint.x;
|
||||
this.fireFrom.y = rotatedPoint.y;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.fireFrom.x = rotatedPoint.x;
|
||||
this.fireFrom.y = rotatedPoint.y;
|
||||
if (this.fireFrom.width > 1)
|
||||
{
|
||||
this.fireFrom.centerOn(this.trackedSprite.world.x + this.trackOffset.x, this.trackedSprite.world.y + this.trackOffset.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.fireFrom.x = this.trackedSprite.world.x + this.trackOffset.x;
|
||||
this.fireFrom.y = this.trackedSprite.world.y + this.trackOffset.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.fireFrom.width > 1)
|
||||
{
|
||||
this.fireFrom.centerOn(this.trackedSprite.world.x + this.trackOffset.x, this.trackedSprite.world.y + this.trackOffset.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.fireFrom.x = this.trackedSprite.world.x + this.trackOffset.x;
|
||||
this.fireFrom.y = this.trackedSprite.world.y + this.trackOffset.y;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.bulletInheritSpriteSpeed)
|
||||
{
|
||||
speed += this.trackedSprite.body.speed;
|
||||
}
|
||||
if (this.bulletInheritSpriteSpeed)
|
||||
{
|
||||
speed += this.trackedSprite.body.speed;
|
||||
}
|
||||
}
|
||||
else if (this.trackedPointer)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue