World#getIndex()

getIndex(child) → {integer} Get the index position of the given child in this group, which should match the child's z property. Parameters Name Type Description child any The child to get the index for. Returns integer - The index of the child or -1 if it's not a member of this group. Inherited From Phaser.Group#getIndex Source code: core/Group.js (Line 1029)

World#getFurthestFrom()

getFurthestFrom(object, callback, callbackContext) → {any} Get the child furthest away from the given Object, with optional callback to filter children. This can be a Sprite, Group, Image or any object with public x and y properties. 'furthest away' is determined by the distance from the objects x and y properties compared to the childs x and y properties. You can use the optional callback argument to apply your own filter to the distance checks.If the child is closer then the previous child,

World#getFirstExists()

getFirstExists(exists, createIfNull, x, y, key, frame) → {DisplayObject} Get the first display object that exists, or doesn't exist. You can use the optional argument createIfNull to create a new Game Object if none matching your exists argument were found in this Group. It works by calling Group.create passing it the parameters given to this method, and returning the new child. If a child was found , createIfNull is false and you provided the additional arguments then the childwill be reset

World#getFirstDead()

getFirstDead(createIfNull, x, y, key, frame) → {DisplayObject} Get the first child that is dead (child.alive === false). This is handy for checking if everything has been wiped out and adding to the pool as needed. You can use the optional argument createIfNull to create a new Game Object if no dead ones were found in this Group. It works by calling Group.create passing it the parameters given to this method, and returning the new child. If a child was found , createIfNull is false and you pr

World#getFirstAlive()

getFirstAlive(createIfNull, x, y, key, frame) → {DisplayObject} Get the first child that is alive (child.alive === true). This is handy for choosing a squad leader, etc. You can use the optional argument createIfNull to create a new Game Object if no alive ones were found in this Group. It works by calling Group.create passing it the parameters given to this method, and returning the new child. If a child was found , createIfNull is false and you provided the additional arguments then the chi

World#getClosestTo()

getClosestTo(object, callback, callbackContext) → {any} Get the closest child to given Object, with optional callback to filter children. This can be a Sprite, Group, Image or any object with public x and y properties. 'close' is determined by the distance from the objects x and y properties compared to the childs x and y properties. You can use the optional callback argument to apply your own filter to the distance checks.If the child is closer then the previous child, it will be sent to cal

World#getChildIndex()

getChildIndex(child) → {Number} Returns the index position of a child DisplayObject instance Parameters Name Type Description child DisplayObject The DisplayObject instance to identify Returns Number - The index position of the child display object to identify Inherited From PIXI.DisplayObjectContainer#getChildIndex Source code: pixi/display/DisplayObjectContainer.js (Line 112)

World#getChildAt()

getChildAt(index) → {DisplayObject} Returns the child at the specified index Parameters Name Type Description index Number The index to get the child from Returns DisplayObject - The child at the given index, if any. Inherited From PIXI.DisplayObjectContainer#getChildAt Source code: pixi/display/DisplayObjectContainer.js (Line 153)

World#getByName()

getByName(name) → {any} Searches the Group for the first instance of a child with the nameproperty matching the given argument. Should more than one child havethe same name only the first instance is returned. Parameters Name Type Description name string The name to search for. Returns any - The first child with a matching name, or null if none were found. Inherited From Phaser.Group#getByName Source code: core/Group.js (Line 1042)

World#getBounds()

getBounds(targetCoordinateSpace) → {Rectangle} Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration. Parameters Name Type Argument Description targetCoordinateSpace PIXIDisplayObject | PIXIMatrix <optional> Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. Returns Rectangle - The rectangular bounding area