GameObjectFactory#text()

text(x, y, text, style, group) → {Phaser.Text}

Creates a new Text object.

Parameters
Name Type Argument Default Description
x number <optional>
0

The x coordinate of the Text. The coordinate is relative to any parent container this text may be in.

y number <optional>
0

The y coordinate of the Text. The coordinate is relative to any parent container this text may be in.

text string <optional>
''

The text string that will be displayed.

style object <optional>

The style object containing style attributes like font, font size , etc.

group Phaser.Group <optional>

Optional Group to add the object to. If not specified it will be added to the World group.

Returns

The newly created text object.

Source code: gameobjects/GameObjectFactory.js (Line 318)
doc_phaser
2017-02-14 10:48:48
Comments
Leave a Comment

Please login to continue.