Utils.Debug#cameraInfo()

cameraInfo(camera, x, y, color) Render camera information including dimensions and location. Parameters Name Type Argument Default Description camera Phaser.Camera The Phaser.Camera to show the debug information for. x number X position of the debug info to be rendered. y number Y position of the debug info to be rendered. color string <optional> 'rgb(255,255,255)' color of the debug info to be rendered. (format is css color string). Source code: utils/Debug.js

Utils.Debug#box2dWorld()

box2dWorld() Renders 'debug draw' data for the Box2D world if it exists.This uses the standard debug drawing feature of Box2D, so colors will be decided bythe Box2D engine. Source code: utils/Debug.js (Line 810)

Utils.Debug#box2dBody()

box2dBody(sprite, color) Renders 'debug draw' data for the given Box2D body.This uses the standard debug drawing feature of Box2D, so colors will be decided by the Box2D engine. Parameters Name Type Argument Default Description sprite Phaser.Sprite The sprite whos body will be rendered. color string <optional> 'rgb(0,255,0)' color of the debug info to be rendered. (format is css color string). Source code: utils/Debug.js (Line 828)

Utils.Debug#bodyInfo()

bodyInfo(sprite, x, y, color) Render a Sprites Physic Body information. Parameters Name Type Argument Default Description sprite Phaser.Sprite The sprite to be rendered. x number X position of the debug info to be rendered. y number Y position of the debug info to be rendered. color string <optional> 'rgb(255,255,255)' color of the debug info to be rendered. (format is css color string). Source code: utils/Debug.js (Line 781)

Utils.Debug#body()

body(sprite, color, filled) Render a Sprites Physics body if it has one set. The body is rendered as a filled or stroked rectangle.This only works for Arcade Physics, Ninja Physics (AABB and Circle only) and Box2D Physics bodies.To display a P2 Physics body you should enable debug mode on the body when creating it. Parameters Name Type Argument Default Description sprite Phaser.Sprite The Sprite who's body will be rendered. color string <optional> 'rgba(0,255,0,0.4)' Color o

Utils.Debug#bmd

bmd : Phaser.BitmapData In WebGL mode this BitmapData contains a copy of the debug canvas. Source code: utils/Debug.js (Line 38)

Utils#Utils

new Utils() Source code: utils/Utils.js (Line 11)

Utils#randomChoice()

randomChoice(choice1, choice2) → {any} Choose between one of two values randomly. Parameters Name Type Description choice1 any choice2 any Returns any - The randomly selected choice Source code: utils/Utils.js (Line 106)

Utils#chanceRoll()

chanceRoll(chance) → {boolean} Generate a random bool result based on the chance value. Returns true or false based on the chance value (default 50%). For example if you wanted a player to have a 30% chanceof getting a bonus, call chanceRoll(30) - true means the chance passed, false means it failed. Parameters Name Type Description chance number The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%). Returns boolean - True if the roll passed, or false

TweenManager#update()

update() → {boolean} Update all the tween objects you added to this manager. Returns boolean - Return false if there's no tween to update, otherwise return true. Source code: tween/TweenManager.js (Line 242)