The Display List plugin.
Display Lists belong to a Scene and maintain the list of Game Objects to render every frame.
Some of these Game Objects may also be part of the Scene's Update List, for updating.
new DisplayList(scene)
name | type | description |
---|---|---|
scene | Phaser.Scene |
The Scene that this Display List belongs to. |
The flag the determines whether Game Objects should be sorted when depthSort()
is called.
Immediately sorts the display list if the flag is set.
Returns an array which contains all objects currently on the Display List. This is a reference to the main list array, not a copy of it, so be careful not to modify it.
The group members.
Force a sort of the display list on the next call to depthSort.
Compare the depth of two Game Objects.
name | type | description |
---|---|---|
childA | Phaser.GameObjects.GameObject |
The first Game Object. |
childB | Phaser.GameObjects.GameObject |
The second Game Object. |
The difference between the depths of each Game Object.