text(x, y, text, style) → {Phaser.Text}
Creates a new Text object.
Parameters
Name Type Description x number X position of the new text object. y number Y position of the new text object. text string The actual text that will be written. style object The style object containing style attributes like font, font size , etc.
Returns
Phaser.Text - The newly created text object.
Source code: gameobjects/GameObjectCreator.js (Line 199)