Group#multiplyAll()

multiplyAll(property, amount, checkAlive, checkVisible) Multiplies the given property by the amount on all children in this group. Group.multiplyAll('x', 2) will x2 the child.x value for each child. Parameters Name Type Description property string The property to multiply, for example 'body.velocity.x' or 'angle'. amount number The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. checkAlive boolean If true the property will only be c

Particle#setFrame()

setFrame(frame) Sets the texture frame the Game Object uses for rendering. This is primarily an internal method used by loadTexture, but is exposed for the use of plugins and custom classes. Parameters Name Type Description frame Phaser.Frame The Frame to be used by the texture. Inherited From Phaser.Component.LoadTexture#setFrame Source code: gameobjects/components/LoadTexture.js (Line 155)

Loader#setPreloadSprite()

setPreloadSprite(sprite, direction) Set a Sprite to be a "preload" sprite by passing it to this method. A "preload" sprite will have its width or height crop adjusted based on the percentage of the loader in real-time.This allows you to easily make loading bars for games. The sprite will automatically be made visible when calling this. Parameters Name Type Argument Default Description sprite Phaser.Sprite | Phaser.Image The sprite or image that will be cropped during the load. directio

Key#onHoldCallback

onHoldCallback : Function A callback that is called while this Key is held down. Warning: Depending on refresh rate that could be 60+ times per second. Source code: input/Key.js (Line 103)

Point.distance()

<static> distance(a, b, round) → {number} Returns the euclidian distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties). Parameters Name Type Argument Default Description a object The target object. Must have visible x and y properties that represent the center of the object. b object The target object. Must have visible x and y properties that represent the center of the object. round boolean <optional> false R

Group#previous()

previous() → {any} Moves the group cursor to the previous (lower) child in the group. If the cursor is at the start of the group (bottom child) it is moved to the end (top child). Returns any - The child the cursor now points to. Source code: core/Group.js (Line 862)

Physics.P2.Body#moveRight()

moveRight(speed) If this Body is dynamic then this will move it to the right by setting its x velocity to the given speed.The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms). Parameters Name Type Description speed number The speed at which it should move to the right, in pixels per second. Source code: physics/p2/Body.js (Line 789)

Physics.P2.Body#moveUp()

moveUp(speed) If this Body is dynamic then this will move it up by setting its y velocity to the given speed.The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms). Parameters Name Type Description speed number The speed at which it should move up, in pixels per second. Source code: physics/p2/Body.js (Line 802)

FlexLayer#multiplyAll()

multiplyAll(property, amount, checkAlive, checkVisible) Multiplies the given property by the amount on all children in this group. Group.multiplyAll('x', 2) will x2 the child.x value for each child. Parameters Name Type Description property string The property to multiply, for example 'body.velocity.x' or 'angle'. amount number The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. checkAlive boolean If true the property will only be c

Group#callAllExists()

callAllExists(callback, existsValue, parameter) Calls a function, specified by name, on all children in the group who exist (or do not exist). After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback. Parameters Name Type Argument Description callback string Name of the function on the children to call. existsValue boolean Only children with exists=existsValue will be called. parameter any <repeatable> Additio