phaser/v3/src/gameobjects/blitter/BlitterFactory.js

22 lines
439 B
JavaScript
Raw Normal View History

var Blitter = require('./Blitter');
2017-04-11 02:13:41 +00:00
var FactoryContainer = require('../FactoryContainer');
var BlitterFactory = {
KEY: 'blitter',
add: function (x, y, key, frame)
{
return this.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);