Options
All
  • Public
  • Public/Protected
  • All
Menu

A vector used to move objects.

Hierarchy

  • Force

Index

Methods

  • add(x: number, y: number): void
  • addForce(force: Force): void
  • clear(): void
  • getAngle(): number
  • getLength(): number
  • getMultiplier(): number
  • getNetworkSyncData(): ForceNetworkSyncData
  • 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

  • updateFromNetworkSyncData(syncData: ForceNetworkSyncData): void

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

Generated using TypeDoc