Options
All
  • Public
  • Public/Protected
  • All
Menu

A vector used to move objects.

Hierarchy

  • Force

Index

Constructors

  • new Force(x: number, y: number, multiplier: number): Force
  • Parameters

    • x: number

      The initial x component

    • y: number

      The initial y component

    • multiplier: number

      The multiplier (0 for a force that disappear on next frame, 1 for a permanent force)

    Returns Force

Methods

  • getAngle(): number
  • getLength(): number
  • getMultiplier(): number
  • getX(): number
  • getY(): number
  • setAngle(angle: number): void
  • setLength(len: number): void
  • setMultiplier(multiplier: number): void
  • setX(x: number): void
  • Set the x component of the force.

    Parameters

    • x: number

      The new X component

    Returns void

  • setY(y: number): void
  • Set the y component of the force.

    Parameters

    • y: number

      The new Y component

    Returns void

Generated using TypeDoc