mirror of
https://github.com/photonstorm/phaser
synced 2024-11-30 08:31:01 +00:00
BitmapData.drawGroupProxy is now capable of iterating through Sprites that have children, and also now uses the world positions for drawing instead.
This commit is contained in:
parent
74af2079b6
commit
1d18c70371
1 changed files with 11 additions and 6 deletions
|
@ -1470,17 +1470,22 @@ Phaser.BitmapData.prototype = {
|
|||
*/
|
||||
drawGroupProxy: function (child, blendMode, roundPx) {
|
||||
|
||||
if (child.type === Phaser.EMITTER || child.type === Phaser.BITMAPTEXT)
|
||||
// Draw base Object
|
||||
if (child.hasOwnProperty('texture'))
|
||||
{
|
||||
this.copy(child, null, null, null, null, child.worldPosition.x, child.worldPosition.y, null, null, child.worldRotation, null, null, child.worldScale.x, child.worldScale.y, child.worldAlpha, blendMode, roundPx);
|
||||
}
|
||||
|
||||
if (child.hasOwnProperty('children') && child.children.length > 0)
|
||||
{
|
||||
var c;
|
||||
|
||||
for (var i = 0; i < child.children.length; i++)
|
||||
{
|
||||
this.copy(child.children[i], null, null, null, null, null, null, null, null, null, null, null, null, null, null, blendMode, roundPx);
|
||||
c = child.children[i];
|
||||
this.copy(c, null, null, null, null, c.worldPosition.x, c.worldPosition.y, null, null, c.worldRotation, null, null, c.worldScale.x, c.worldScale.y, child.worldAlpha, blendMode, roundPx);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.copy(child, null, null, null, null, null, null, null, null, null, null, null, null, null, null, blendMode, roundPx);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue