mirror of
https://github.com/photonstorm/phaser
synced 2025-01-06 10:18:54 +00:00
21 lines
532 B
JavaScript
21 lines
532 B
JavaScript
|
var BitmapText = require('./BitmapText');
|
||
|
var FactoryContainer = require('../../gameobjects/FactoryContainer');
|
||
|
|
||
|
var BitmapTextFactory = {
|
||
|
|
||
|
KEY: 'bitmapText',
|
||
|
|
||
|
add: function (x, y, font, text, size, align)
|
||
|
{
|
||
|
return this.state.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);
|