phaser/v3/src/gameobjects/bitmaptext/static/BitmapTextFactory.js

21 lines
514 B
JavaScript
Raw Normal View History

var BitmapText = require('./BitmapText');
2017-03-08 22:36:53 +00:00
var FactoryContainer = require('../../FactoryContainer');
var BitmapTextFactory = {
KEY: 'bitmapText',
add: function (x, y, font, text, size, align)
{
return this.children.add(new BitmapText(this.state, x, y, font, text, size, align));
},
make: function (x, y, font, text, size, align)
{
return new BitmapText(this.state, x, y, font, text, size, align);
}
};
module.exports = FactoryContainer.register(BitmapTextFactory);