mirror of
https://github.com/photonstorm/phaser
synced 2024-12-28 05:53:49 +00:00
24 lines
520 B
JavaScript
24 lines
520 B
JavaScript
|
|
||
|
var Blitter = require('./Blitter');
|
||
|
var FactoryContainer = require('../../gameobjects/FactoryContainer');
|
||
|
|
||
|
var BlitterFactory = {
|
||
|
|
||
|
KEY: 'blitter',
|
||
|
|
||
|
add: function (x, y, key, frame, group)
|
||
|
{
|
||
|
if (group === undefined) { group = this.state; }
|
||
|
|
||
|
return group.children.add(new Blitter(this.state, x, y, key, frame));
|
||
|
},
|
||
|
|
||
|
make: function (x, y, key, frame)
|
||
|
{
|
||
|
return new Blitter(this.state, x, y, key, frame);
|
||
|
}
|
||
|
|
||
|
};
|
||
|
|
||
|
module.exports = FactoryContainer.register(BlitterFactory);
|