• Public
  • Public/Protected
  • All

Allows objects to be moved in a realistic way thanks to a physics engine (Box2D).




  • activate(enable: boolean): void
  • activated(): boolean
  • addGearJointBetweenObjects(object: any, ratio: any): void
  • addRevoluteJoint(xPosition: any, yPosition: any): void
  • addRevoluteJointBetweenObjects(object: any, scene: any, xPosRelativeToMassCenter: any, yPosRelativeToMassCenter: any): void
  • applyForce(xCoordinate: any, yCoordinate: any): void
  • applyForceTowardPosition(xPosition: any, yPosition: any, length: any): void
  • applyForceUsingPolarCoordinates(angle: any, length: any): void
  • applyImpulse(xCoordinate: any, yCoordinate: any): void
  • applyImpulseTowardPosition(xPosition: any, yPosition: any, length: any): void
  • applyImpulseUsingPolarCoordinates(angle: any, length: any): void
  • applyTorque(torque: any): void
  • b2Vec2(x: any, y: any): any
  • collisionWith(otherObjectsTable: any): boolean
  • createBody(): void
  • doStepPostEvents(runtimeScene: any): void
  • doStepPreEvents(runtimeScene: any): void
  • dontSetAsBullet(): void
  • getAngularDamping(): any
  • getAngularVelocity(): any
  • getBox2DBody(): any
  • getLinearDamping(): any
  • getLinearVelocity(): number
  • getLinearVelocityX(): number
  • getLinearVelocityY(): number
  • getName(): string
  • getNameId(): number
  • isDynamic(): boolean
  • isStatic(): boolean
  • onActivate(): void
  • onCreated(): void
  • onDeActivate(): void
  • onDestroy(): void
  • This method is called when the owner of the behavior is being removed from the scene and is about to be destroyed/reused later or when the behavior is removed from an object (can happen in case of hot-reloading only. Otherwise, behaviors are just de-activated, not removed. See onDeActivate).

    Returns void

  • onObjectHotReloaded(): void
  • setAngularDamping(angularDamping: any): void
  • setAngularVelocity(angularVelocity: any): void
  • setAsBullet(): void
  • setDynamic(): void
  • setFixedRotation(): void
  • setFreeRotation(): void
  • setGravity(xGravity: any, yGravity: any): void
  • setLinearDamping(linearDamping: any): void
  • setLinearVelocity(xVelocity: any, yVelocity: any): void
  • setLinearVelocityX(xVelocity: any): void
  • setLinearVelocityY(yVelocity: any): void
  • setStatic(): void
  • updateFromBehaviorData(oldBehaviorData: any, newBehaviorData: any): boolean



currentContacts: any = []
name: string
type: string

Generated using TypeDoc