phaser/v3/src/gameobjects/zone/ZoneFactory.js
2017-04-11 03:13:41 +01:00

20 lines
410 B
JavaScript

var Zone = require('./Zone');
var FactoryContainer = require('../FactoryContainer');
var ZoneFactory = {
KEY: 'zone',
add: function (x, y, width, height)
{
return new Zone(this.state, x, y, width, height);
},
make: function (x, y, width, height)
{
return new Zone(this.state, x, y, width, height);
}
};
module.exports = FactoryContainer.register(ZoneFactory);