Trait/Object

io.scalajs.dom.html.phaser.component

PhysicsBody

Related Docs: object PhysicsBody | package component

Permalink

trait PhysicsBody extends Object

The PhysicsBody component manages the Game Objects physics body and physics enabling. It also overrides the x and y properties, ensuring that any manual adjustment of them is reflected in the physics body itself.

Annotations
@RawJSType() @native()
See also

https://phaser.io/docs/2.6.2/Phaser.Component.PhysicsBody.html

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

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. var body: Body

    Permalink

    body is the Game Objects physics body.

    body is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

    By default Game Objects won't add themselves to any physics system and their body property will be null.

    To enable this Game Object for physics you need to call game.physics.enable(object, system) where object is this object and system is the Physics system you are using. If none is given it defaults to Phaser.Physics.Arcade.

    You can alternatively call game.physics.arcade.enable(object), or add this Game Object to a physics enabled Group.

    Important: Enabling a Game Object for P2 or Ninja physics will automatically set its anchor property to 0.5, so the physics body is centered on the Game Object.

    If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

  6. def clone(): AnyRef

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  20. def toLocaleString(): String

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. def x: Double

    Permalink

    The position of the Game Object on the x axis relative to the local coordinates of the parent.

  27. def x_=(x: Double): Unit

    Permalink
  28. def y: Double

    Permalink

    The position of the Game Object on the y axis relative to the local coordinates of the parent.

  29. def y_=(y: Double): Unit

    Permalink

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped