mirror of
https://github.com/photonstorm/phaser
synced 2025-01-15 06:34:01 +00:00
22 lines
472 B
JavaScript
22 lines
472 B
JavaScript
|
|
var Quad = require('./Quad');
|
|
var BuildFromConfig = require('./BuildFromConfig');
|
|
var FactoryContainer = require('../../gameobjects/FactoryContainer');
|
|
|
|
var QuadFactory = {
|
|
|
|
KEY: 'quad',
|
|
|
|
add: function (x, y, key, frame)
|
|
{
|
|
return this.children.add(new Quad(this.state, x, y, key, frame));
|
|
},
|
|
|
|
make: function (config)
|
|
{
|
|
return BuildFromConfig(this.state, config);
|
|
}
|
|
|
|
};
|
|
|
|
module.exports = FactoryContainer.register(QuadFactory);
|