mirror of
https://github.com/photonstorm/phaser
synced 2025-01-15 14:44:01 +00:00
23 lines
472 B
JavaScript
23 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);
|