mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Added new ProcessQueue events
This commit is contained in:
parent
ea75c5ca9a
commit
f3cc1f82fe
3 changed files with 58 additions and 0 deletions
21
src/structs/events/PROCESS_QUEUE_ADD_EVENT.js
Normal file
21
src/structs/events/PROCESS_QUEUE_ADD_EVENT.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2019 Photon Storm Ltd.
|
||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* The Process Queue Add Event.
|
||||
*
|
||||
* This event is dispatched by a Process Queue when a new item is successfully moved to its active list.
|
||||
*
|
||||
* You will most commonly see this used by a Scene's Update List when a new Game Object has been added.
|
||||
*
|
||||
* In that instance, listen to this event from within a Scene using: `this.sys.updateList.on('add', listener)`.
|
||||
*
|
||||
* @event Phaser.Structs.Events#PROCESS_QUEUE_ADD
|
||||
* @since 3.20.0
|
||||
*
|
||||
* @param {*} item - The item that was added to the Process Queue.
|
||||
*/
|
||||
module.exports = 'add';
|
21
src/structs/events/PROCESS_QUEUE_REMOVE_EVENT.js
Normal file
21
src/structs/events/PROCESS_QUEUE_REMOVE_EVENT.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2019 Photon Storm Ltd.
|
||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* The Process Queue Remove Event.
|
||||
*
|
||||
* This event is dispatched by a Process Queue when a new item is successfully removed from its active list.
|
||||
*
|
||||
* You will most commonly see this used by a Scene's Update List when a Game Object has been removed.
|
||||
*
|
||||
* In that instance, listen to this event from within a Scene using: `this.sys.updateList.on('remove', listener)`.
|
||||
*
|
||||
* @event Phaser.Structs.Events#PROCESS_QUEUE_REMOVE
|
||||
* @since 3.20.0
|
||||
*
|
||||
* @param {*} item - The item that was removed from the Process Queue.
|
||||
*/
|
||||
module.exports = 'remove';
|
16
src/structs/events/index.js
Normal file
16
src/structs/events/index.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2019 Photon Storm Ltd.
|
||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @namespace Phaser.Structs.Events
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
|
||||
PROCESS_QUEUE_ADD: require('./PROCESS_QUEUE_ADD_EVENT'),
|
||||
PROCESS_QUEUE_REMOVE: require('./PROCESS_QUEUE_REMOVE_EVENT')
|
||||
|
||||
};
|
Loading…
Add table
Reference in a new issue