Text#setText()

setText(text, immediate) → {Phaser.Text} The text to be displayed by this Text object.Use a \n to insert a carriage return and split the text.The text will be rendered with any style currently set. Use the optional immediate argument if you need the Text display to update immediately. If not it will re-create the texture of this Text object during the next time the renderloop is called. Parameters Name Type Argument Default Description text string <optional> The text to be display

Text#setStyle()

setStyle(style, update) → {Phaser.Text} Set the style of the text by passing a single style object to it. Parameters Name Type Argument Default Description style object <optional> The style properties to be set on the Text. Properties Name Type Argument Default Description font string <optional> 'bold 20pt Arial' The style and size of the font. fontStyle string <optional> (from font) The style of the font (eg. 'italic'): overrides the value in style.font. fo

Text#setShadow()

setShadow(x, y, color, blur, shadowStroke, shadowFill) → {Phaser.Text} Sets a drop shadow effect on the Text. You can specify the horizontal and vertical distance of the drop shadow with the x and y parameters.The color controls the shade of the shadow (default is black) and can be either an rgba or hex value.The blur is the strength of the shadow. A value of zero means a hard shadow, a value of 10 means a very soft shadow.To remove a shadow already in place you can call this method with no p

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

Text#setHealth

setHealth Sets the health property of the Game Object to the given amount.Will never exceed the maxHealth value. Inherited From Phaser.Component.Health#setHealth Source code: gameobjects/components/Health.js (Line 70)

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

Text#setChildIndex()

setChildIndex(child, index) Changes the position of an existing child in the display object container Parameters Name Type Description child DisplayObject The child DisplayObject instance for which you want to change the index number index Number The resulting index number for the child display object Inherited From PIXI.DisplayObjectContainer#setChildIndex Source code: pixi/display/DisplayObjectContainer.js (Line 132)

Text#sendToBack()

sendToBack() → {PIXI.DisplayObject} Sends this Game Object to the bottom of its parents display list.Visually this means it will render below all other children in the same Group. If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World,because the World is the root Group from which all Game Objects descend. Returns PIXI.DisplayObject - This instance. Inherited From Phaser.Component.BringToTop#sendToBack Source code: gameob

Text#scaleMin

scaleMin : Phaser.Point The minimum scale this Game Object will scale down to. It allows you to prevent a parent from scaling this Game Object lower than the given value. Set it to null to remove the limit. Inherited From Phaser.Component.ScaleMinMax#scaleMin Source code: gameobjects/components/ScaleMinMax.js (Line 36)

Text#scaleMax

scaleMax : Phaser.Point The maximum scale this Game Object will scale up to. It allows you to prevent a parent from scaling this Game Object higher than the given value. Set it to null to remove the limit. Inherited From Phaser.Component.ScaleMinMax#scaleMax Source code: gameobjects/components/ScaleMinMax.js (Line 46)