2020-12-02 13:48:38 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
|
|
|
* @copyright 2020 Photon Storm Ltd.
|
|
|
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
|
|
|
*/
|
|
|
|
|
|
|
|
var GameObjectFactory = require('../GameObjectFactory');
|
|
|
|
var PointLight = require('./PointLight');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a new Point Light Game Object and adds it to the Scene.
|
|
|
|
*
|
|
|
|
* Note: This method will only be available if the Point Light Game Object has been built into Phaser.
|
|
|
|
*
|
|
|
|
* @method Phaser.GameObjects.GameObjectFactory#pointlight
|
|
|
|
* @since 3.50.0
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @return {Phaser.GameObjects.PointLight} The Game Object that was created.
|
|
|
|
*/
|
2020-12-03 12:52:36 +00:00
|
|
|
GameObjectFactory.register('pointlight', function (x, y, color, radius, intensity, attenuation)
|
2020-12-02 13:48:38 +00:00
|
|
|
{
|
2020-12-03 12:52:36 +00:00
|
|
|
return this.displayList.add(new PointLight(this.scene, x, y, color, radius, intensity, attenuation));
|
2020-12-02 13:48:38 +00:00
|
|
|
});
|