mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 14:40:38 +00:00
Blitter.create only uses default frame if none provided.
This commit is contained in:
parent
e5b1b939f5
commit
f23c68caa6
2 changed files with 6 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
var CHECKSUM = {
|
var CHECKSUM = {
|
||||||
build: '6edc5a30-7eb3-11e7-b731-39dba554739e'
|
build: '382f15a0-80e7-11e7-8972-194766e6f4cf'
|
||||||
};
|
};
|
||||||
module.exports = CHECKSUM;
|
module.exports = CHECKSUM;
|
|
@ -51,11 +51,14 @@ var Blitter = new Class({
|
||||||
// frame MUST be part of the Blitter texture
|
// frame MUST be part of the Blitter texture
|
||||||
create: function (x, y, frame, visible, index)
|
create: function (x, y, frame, visible, index)
|
||||||
{
|
{
|
||||||
if (frame === undefined) { frame = this.frame; }
|
|
||||||
if (visible === undefined) { visible = true; }
|
if (visible === undefined) { visible = true; }
|
||||||
if (index === undefined) { index = this.children.length; }
|
if (index === undefined) { index = this.children.length; }
|
||||||
|
|
||||||
if (typeof frame === 'string')
|
if (frame === undefined)
|
||||||
|
{
|
||||||
|
frame = this.frame;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
frame = this.texture.get(frame);
|
frame = this.texture.get(frame);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue