phaser/v3/src/gameobjects/quad/QuadCreator.js
photonstorm d804e056ed Renaming from State to Scene internally.
This is one monster update.
2017-07-14 14:50:51 +01:00

19 lines
548 B
JavaScript

var Quad = require('./Quad');
var GetAdvancedValue = require('../../utils/object/GetAdvancedValue');
var BuildGameObject = require('../BuildGameObject');
var QuadCreator = function (scene, config)
{
var x = GetAdvancedValue(config, 'x', 0);
var y = GetAdvancedValue(config, 'y', 0);
var key = GetAdvancedValue(config, 'key', null);
var frame = GetAdvancedValue(config, 'frame', null);
var quad = new Quad(scene, x, y, key, frame);
BuildGameObject(scene, quad, config);
return quad;
};
module.exports = QuadCreator;