phaser/v3/src/gameobjects/graphics/GraphicsCreator.js

10 lines
310 B
JavaScript
Raw Normal View History

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);
});