Class: DOMSprite

Phaser. DOMSprite

Phaser.DOMSprite

new DOMSprite(game, id, x, y, text, style)

Create a new DOMSprite.

Parameters:
Name Type Description
game Phaser.Game

Current game instance.

id string

DOM ID.

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 ,

Source:

Members

alive

Properties:
Name Type Description
alive boolean

This is a handy little var your game can use to determine if an object is alive or not, it doesn't effect rendering.

Default Value:
  • true
Source:

exists

Properties:
Name Type Description
exists boolean

If exists = false then the Text isn't updated by the core game loop.

Default Value:
  • true
Source:

game

Properties:
Name Type Description
game Phaser.Game

A reference to the currently running Game.

Source:

group

Properties:
Name Type Description
group Phaser.Group

The parent Group of this Text object.

Source:

name

Properties:
Name Type Description
name string

The user defined name given to this object.

Source:

type

Properties:
Name Type Description
type number

The const type of this object.

Source:

visible

Properties:
Name Type Description
visible boolean

Sets the visible state of this DOMSprite.

Default Value:
  • true
Source:
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Wed Feb 05 2014 06:28:27 GMT-0000 (GMT) using the DocStrap template.