2017-05-19 19:07:30 +00:00
|
|
|
var Quad = require('./Quad');
|
|
|
|
var GetAdvancedValue = require('../../utils/object/GetAdvancedValue');
|
|
|
|
var BuildGameObject = require('../BuildGameObject');
|
|
|
|
|
2017-07-14 13:30:20 +00:00
|
|
|
var QuadCreator = function (scene, config)
|
2017-05-19 19:07:30 +00:00
|
|
|
{
|
2017-05-23 12:29:40 +00:00
|
|
|
var x = GetAdvancedValue(config, 'x', 0);
|
|
|
|
var y = GetAdvancedValue(config, 'y', 0);
|
2017-05-19 19:07:30 +00:00
|
|
|
var key = GetAdvancedValue(config, 'key', null);
|
|
|
|
var frame = GetAdvancedValue(config, 'frame', null);
|
|
|
|
|
2017-07-14 13:30:20 +00:00
|
|
|
var quad = new Quad(scene, x, y, key, frame);
|
2017-05-19 19:07:30 +00:00
|
|
|
|
2017-07-14 13:30:20 +00:00
|
|
|
BuildGameObject(scene, quad, config);
|
2017-05-19 19:07:30 +00:00
|
|
|
|
|
|
|
return quad;
|
|
|
|
};
|
|
|
|
|
2017-07-04 00:59:31 +00:00
|
|
|
module.exports = QuadCreator;
|