phaser/src/gameobjects/graphics/GraphicsCreator.js
2018-01-09 21:43:56 +00:00

9 lines
310 B
JavaScript

var GameObjectCreator = require('../../scene/plugins/GameObjectCreator');
var Graphics = require('./Graphics');
// When registering a factory function 'this' refers to the GameObjectCreator context.
GameObjectCreator.register('graphics', function (config)
{
return new Graphics(this.scene, config);
});