Blitter.create only uses default frame if none provided.

This commit is contained in:
photonstorm 2017-08-14 13:13:27 +01:00
parent e5b1b939f5
commit f23c68caa6
2 changed files with 6 additions and 3 deletions

View file

@ -1,4 +1,4 @@
var CHECKSUM = {
build: '6edc5a30-7eb3-11e7-b731-39dba554739e'
build: '382f15a0-80e7-11e7-8972-194766e6f4cf'
};
module.exports = CHECKSUM;

View file

@ -51,11 +51,14 @@ var Blitter = new Class({
// frame MUST be part of the Blitter texture
create: function (x, y, frame, visible, index)
{
if (frame === undefined) { frame = this.frame; }
if (visible === undefined) { visible = true; }
if (index === undefined) { index = this.children.length; }
if (typeof frame === 'string')
if (frame === undefined)
{
frame = this.frame;
}
else
{
frame = this.texture.get(frame);
}