2018-03-23 17:15:52 +00:00
|
|
|
var GetAdvancedValue = require('../../utils/object/GetAdvancedValue');
|
|
|
|
var GameObjectCreator = require('../GameObjectCreator');
|
|
|
|
var Container = require('./Container');
|
|
|
|
|
|
|
|
GameObjectCreator.register('container', function (config)
|
|
|
|
{
|
|
|
|
var x = GetAdvancedValue(config, 'x', 0.0);
|
|
|
|
var y = GetAdvancedValue(config, 'y', 0.0);
|
2018-03-27 20:32:33 +00:00
|
|
|
var add = GetAdvancedValue(config, 'add', true);
|
|
|
|
var container = new Container(this.scene, x, y);
|
|
|
|
|
|
|
|
if (add)
|
|
|
|
{
|
|
|
|
this.scene.sys.displayList.add(container);
|
|
|
|
}
|
2018-03-23 17:15:52 +00:00
|
|
|
|
2018-03-27 20:32:33 +00:00
|
|
|
return container;
|
2018-03-23 17:15:52 +00:00
|
|
|
});
|