Events#Events

new Events(sprite) The Events component is a collection of events fired by the parent Game Object. Phaser uses what are known as 'Signals' for all event handling. All of the events inthis class are signals you can subscribe to, much in the same way you'd "listen" foran event. For example to tell when a Sprite has been added to a new group, you can bind a functionto the onAddedToGroup signal: sprite.events.onAddedToGroup.add(yourFunction, this); Where yourFunction is the function you want call

Group#y

y : number The y coordinate of the group container. You can adjust the group container itself by modifying its coordinates.This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position. Source code: core/Group.js (Line 2978)

TileSprite#z

[readonly] z : number The z depth of this Game Object within its parent Group.No two objects in a Group can have the same z value.This value is adjusted automatically whenever the Group hierarchy changes.If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop. Inherited From Phaser.Component.Core#z Source code: gameobjects/components/Core.js (Line 177)

Animation#next()

next(quantity) Advances by the given number of frames in the Animation, taking the loop value into consideration. Parameters Name Type Argument Default Description quantity number <optional> 1 The number of frames to advance. Source code: animation/Animation.js (Line 531)

Rope#reset()

reset(x, y) → {Phaser.Rope} Resets the Rope. This places the Rope at the given x/y world coordinates and thensets alive, exists, visible and renderable all to true. Also resets the outOfBounds state.If the Rope has a physics body that too is reset. Parameters Name Type Description x number The x coordinate (in world space) to position the Sprite at. y number The y coordinate (in world space) to position the Sprite at. Returns Phaser.Rope - This instance. Source code: gameobjects/

Pointer#eraserButton

eraserButton : Phaser.DeviceButton If this Pointer is a Pen / Stylus then you can access its eraser button directly through this property. The DeviceButton has its own properties such as isDown, duration and methods like justReleased for more fine-grainedbutton control. Please see the DeviceButton docs for details on browser button limitations. Source code: input/Pointer.js (Line 146)

Button#fresh

[readonly] fresh : boolean A Game Object is considered fresh if it has just been created or reset and is yet to receive a renderer transform update.This property is mostly used internally by the physics systems, but is exposed for the use of plugins. Inherited From Phaser.Component.Core#fresh Source code: gameobjects/components/Core.js (Line 248)

Bullet#frame

frame : integer Gets or sets the current frame index of the texture being used to render this Game Object. To change the frame set frame to the index of the new frame in the sprite sheet you wish this Game Object to use,for example: player.frame = 4. If the frame index given doesn't exist it will revert to the first frame found in the texture. If you are using a texture atlas then you should use the frameName property instead. If you wish to fully replace the texture being used see loadTextur

Rope#centerY

centerY : number The center y coordinate of the Game Object.This is the same as (y - offsetY) + (height / 2). Inherited From Phaser.Component.Bounds#centerY Source code: gameobjects/components/Bounds.js (Line 80)

Text#setScaleMinMax()

setScaleMinMax(minX, minY, maxX, maxY) Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent. For example if this Game Object has a minScale value of 1 and its parent has a scale value of 0.5, the 0.5 will be ignoredand the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to. By setting these values you can carefully control how Game Objects deal with respo