Class

io.scalajs.dom.html.phaser

GameObjectCreator

Related Doc: package phaser

Permalink

class GameObjectCreator extends Object

The GameObjectCreator is a quick way to create common game objects without adding them to the game world. The object creator can be accessed with game.make.

Annotations
@RawJSType() @native() @JSName( "Phaser.GameObjectCreator" )
See also

https://phaser.io/docs/2.6.2/Phaser.GameObjectCreator.html

Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GameObjectCreator
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GameObjectCreator(game: Phaser.Game)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def audio(key: String, volume: Double = js.native, loop: Boolean = js.native, connect: Boolean = js.native): Phaser.Sound

    Permalink

    Creates a new Sound object.

    Creates a new Sound object.

    key

    The Game.cache key of the sound that this object will use.

    volume

    The volume at which the sound will be played.

    loop

    Whether or not the sound will loop.

    connect

    Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.

    returns

    The newly created text object.

  6. def audioSprite(key: String): Phaser.AudioSprite

    Permalink

    Creates a new AudioSprite object.

    Creates a new AudioSprite object.

    key

    The Game.cache key of the sound that this object will use.

    returns

    The newly created AudioSprite object.

  7. def bitmapData(width: Double = js.native, height: Double = js.native, key: String = js.native, addToCache: Boolean = js.native): Phaser.BitmapData

    Permalink

    Create a BitmpaData object.

    Create a BitmpaData object. A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

    width

    The width of the BitmapData in pixels.

    height

    The height of the BitmapData in pixels.

    key

    Asset key for the BitmapData when stored in the Cache (see addToCache parameter).

    addToCache

    Should this BitmapData be added to the Game.Cache? If so you can retrieve it with Cache.getBitmapData(key)

    returns

    The newly created Phaser.BitmapData object.

  8. def bitmapText(x: Double, y: Double, font: String, text: String, size: Double, align: String): Phaser.BitmapData

    Permalink

    Create a new BitmapText object.

    Create a new BitmapText object. BitmapText objects work by taking a texture file and an XML file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

    BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor first, applying fills and any other effects required. To create multi-line text insert \r, \n or \r\n escape codes into the text string.

    x

    X-coordinate to display the BitmapText object at.

    y

    Y-coordinate to display the BitmapText object at.

    font

    The key of the BitmapText as stored in Phaser.Cache.

    text

    The text that will be rendered. This can also be set later via BitmapText.text.

    size

    The size the font will be rendered at in pixels.

    align

    The alignment of multi-line text. Has no effect if there is only one line of text.

    returns

    The newly created bitmapText object.

  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. var game: Phaser.Game

    Permalink
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def text(x: Double, y: Double, text: String, style: RawOptions): Phaser.Text

    Permalink

    Creates a new Text object.

    Creates a new Text object.

    x

    X-position of the new text object.

    y

    Y-position of the new text object.

    text

    The actual text that will be written.

    style

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

    returns

    The newly created text object.

  25. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def world: Phaser.World

    Permalink

    A reference to the game world

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped