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

World#getBottom()

getBottom() → {any} Returns the child at the bottom of this group. The bottom child the child being displayed (rendered) below every other child. Returns any - The child at the bottom of the Group. Inherited From Phaser.Group#getBottom Source code: core/Group.js (Line 2221)

World#getAt()

getAt(index) → {DisplayObject | integer} Returns the child found at the given index within this group. Parameters Name Type Description index integer The index to return the child from. Returns DisplayObject | integer - The child that was found at the given index, or -1 for an invalid index. Inherited From Phaser.Group#getAt Source code: core/Group.js (Line 524)