FlexLayer#getTop()

getTop() → {any} Return the child at the top of this group. The top child is the child displayed (rendered) above every other child. Returns any - The child at the top of the Group. Inherited From Phaser.Group#getTop Source code: core/Group.js (Line 2204)

FlexLayer#getRandomExists()

getRandomExists(startIndex, endIndex) → {any} Returns a random child from the Group that has exists set to true. Optionally you can specify a start and end index. For example if this Group had 100 children,and you set startIndex to 0 and endIndex to 50, it would return a random child from onlythe first 50 children in the Group. Parameters Name Type Argument Default Description startIndex integer <optional> 0 The first child index to start the search from. endIndex integer <o

FlexLayer#getRandom()

getRandom(startIndex, length) → {any} Returns a random child from the group. Parameters Name Type Argument Default Description startIndex integer <optional> 0 Offset from the front of the group (lowest child). length integer <optional> (to top) Restriction on the number of values you want to randomly select from. Returns any - A random child of this Group. Inherited From Phaser.Group#getRandom Source code: core/Group.js (Line 2350)

FlexLayer#getLocalBounds()

getLocalBounds() → {Rectangle} Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration. Returns Rectangle - The rectangular bounding area Inherited From PIXI.DisplayObjectContainer#getLocalBounds Source code: pixi/display/DisplayObjectContainer.js (Line 437)

FlexLayer#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)

FlexLayer#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,

FlexLayer#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

FlexLayer#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

FlexLayer#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

FlexLayer#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