new Text(game, x, y, text, style)
Create a new game object for displaying Text. This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view.Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded. See this compatibility table for the available default fonts across mobile browsers.
Parameters
Name Type Argument Description game Phaser.Game Current game i