mirror of
https://github.com/photonstorm/phaser
synced 2025-01-13 05:38:48 +00:00
25 lines
801 B
JavaScript
25 lines
801 B
JavaScript
|
/**
|
||
|
* @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.
|
||
|
*/
|
||
|
GameObjectFactory.register('pointlight', function (x, y, color, radius, intensity)
|
||
|
{
|
||
|
return this.displayList.add(new PointLight(this.scene, x, y, color, radius, intensity));
|
||
|
});
|