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#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#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#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#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#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#setTextBounds()

setTextBounds(x, y, width, height) → {Phaser.Text} The Text Bounds is a rectangular region that you control the dimensions of into which the Text object itself is positioned,regardless of the number of lines in the text, the font size or any other attribute. Alignment is controlled via the properties boundsAlignH and boundsAlignV within the Text.style object, or can be directlyset through the setters Text.boundsAlignH and Text.boundsAlignV. Bounds alignment is independent of text alignment. F

Text#setTexture()

setTexture(texture, destroy) Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previoustexture this Sprite was using. Parameters Name Type Argument Default Description texture PIXI.Texture The PIXI texture that is displayed by the sprite destroy Boolean <optional> false Call Texture.destroy on the current texture before replacing it with the new one? Inherited From PIXI.Sprite#setTexture Source code: pixi/display/Sprite.js (Line 163)

Text#shader

shader : PIXI.AbstractFilter The shader that will be used to render this Sprite.Set to null to remove a current shader. Inherited From PIXI.Sprite#shader Default Value null Source code: pixi/display/Sprite.js (Line 93)

Text#shadowBlur

shadowBlur : number The shadowBlur value. Make the shadow softer by applying a Gaussian blur to it. A number from 0 (no blur) up to approx. 10 (depending on scene). Source code: gameobjects/Text.js (Line 2173)