Class

io.scalajs.dom.html.phaser.physics.ninja

Body

Related Doc: package ninja

Permalink

class Body extends Object

The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, bounce values etc all on the Body.

Annotations
@RawJSType() @native() @JSName( "Phaser.Physics.Ninja.Body" )
See also

http://phaser.io/docs/2.6.2/Phaser.Physics.Ninja.Body.html

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

Instance Constructors

  1. new Body(system: Phaser.Physics.Ninja, sprite: Phaser.Sprite, type: Int = js.native, id: Int = js.native, radius: Double = js.native, x: Double = js.native, y: Double = js.native, width: Double = js.native, height: Double = js.native)

    Permalink

    system

    The physics system this Body belongs to.

    sprite

    The Sprite object this physics body belongs to.

    id

    If this body is using a Tile shape, you can set the Tile id here, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc.

    radius

    If this body is using a Circle shape this controls the radius.

    x

    The x coordinate of this Body. This is only used if a sprite is not provided.

    y

    The y coordinate of this Body. This is only used if a sprite is not provided.

    width

    The width of this Body. This is only used if a sprite is not provided.

    height

    The height of this Body. This is only used if a sprite is not provided.

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. var aabb: Phaser.Physics.Ninja.AABB

    Permalink

    The AABB object this body is using for collision.

  5. def angle: Double

    Permalink

    The angle of this Body

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. var bottom: Double

    Permalink

    The bottom value of this Body (same as Body.y + Body.height)

  8. var bounce: Double

    Permalink

    The bounciness of this object when it collides.

    The bounciness of this object when it collides. A value between 0 and 1. We recommend setting it to 0.999 to avoid jittering.

  9. var checkCollision: Object

    Permalink

    Set the checkCollision properties to control which directions collision is processed for this Body.

    Set the checkCollision properties to control which directions collision is processed for this Body. For example checkCollision.up = false means it won't collide when the collision happened while moving up. An object containing allowed collision.

  10. def clone(): AnyRef

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  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. var height: Double

    Permalink

    The height of this Body.

    The height of this Body. This is only used if a sprite is not provided.

  18. var id: Int

    Permalink

    If this body is using a Tile shape, you can set the Tile id here, i.e.

    If this body is using a Tile shape, you can set the Tile id here, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc.

  19. final def isInstanceOf[T0]: Boolean

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

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

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

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

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

    Permalink
    Definition Classes
    Object
  25. var radius: Double

    Permalink

    If this body is using a Circle shape this controls the radius.

  26. var sprite: Phaser.Sprite

    Permalink

    The Sprite object this physics body belongs to.

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. var system: Phaser.Physics.Ninja

    Permalink

    The physics system this Body belongs to.

  29. def toLocaleString(): String

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

    Permalink
    Definition Classes
    AnyRef → Any
  31. var type: Int

    Permalink
  32. def valueOf(): Any

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. var width: Double

    Permalink

    The width of this Body.

    The width of this Body. This is only used if a sprite is not provided.

  37. var x: Double

    Permalink

    The x coordinate of this Body.

    The x coordinate of this Body. This is only used if a sprite is not provided.

  38. var y: Double

    Permalink

    The y coordinate of this Body.

    The y coordinate of this Body. This is only used if a sprite is not provided.

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped