mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
displayList might be null
This commit is contained in:
parent
266c1f411d
commit
f9cf19f479
1 changed files with 36 additions and 4 deletions
|
@ -97,7 +97,15 @@ var Depth = {
|
|||
*/
|
||||
bringMeToTop: function()
|
||||
{
|
||||
var list = (this.parentContainer) ? this.parentContainer.list : this.displayList.list;
|
||||
var list;
|
||||
if (this.parentContainer)
|
||||
{
|
||||
list = this.parentContainer.list;
|
||||
}
|
||||
else if (this.displayList)
|
||||
{
|
||||
list = this.displayList.list;
|
||||
}
|
||||
|
||||
if (!list)
|
||||
{
|
||||
|
@ -118,7 +126,15 @@ var Depth = {
|
|||
*/
|
||||
sendMeToBack: function()
|
||||
{
|
||||
var list = (this.parentContainer) ? this.parentContainer.list : this.displayList.list;
|
||||
var list;
|
||||
if (this.parentContainer)
|
||||
{
|
||||
list = this.parentContainer.list;
|
||||
}
|
||||
else if (this.displayList)
|
||||
{
|
||||
list = this.displayList.list;
|
||||
}
|
||||
|
||||
if (!list)
|
||||
{
|
||||
|
@ -142,7 +158,15 @@ var Depth = {
|
|||
*/
|
||||
moveMyDepthBelow: function(gameObject)
|
||||
{
|
||||
var list = (this.parentContainer) ? this.parentContainer.list : this.displayList.list;
|
||||
var list;
|
||||
if (this.parentContainer)
|
||||
{
|
||||
list = this.parentContainer.list;
|
||||
}
|
||||
else if (this.displayList)
|
||||
{
|
||||
list = this.displayList.list;
|
||||
}
|
||||
|
||||
if (!list)
|
||||
{
|
||||
|
@ -166,7 +190,15 @@ var Depth = {
|
|||
*/
|
||||
moveMyDepthAbove: function(gameObject)
|
||||
{
|
||||
var list = (this.parentContainer) ? this.parentContainer.list : this.displayList.list;
|
||||
var list;
|
||||
if (this.parentContainer)
|
||||
{
|
||||
list = this.parentContainer.list;
|
||||
}
|
||||
else if (this.displayList)
|
||||
{
|
||||
list = this.displayList.list;
|
||||
}
|
||||
|
||||
if (!list)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue