A vector used to move objects.

Constructors

  • 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

  • Return 1 (true) if the force is permanent, 0 (false) if it is instant.

    Returns number

  • Set the angle of the force.

    Parameters

    • angle: number

      The new angle

    Returns void

  • Set the length of the force.

    Parameters

    • len: number

      The length

    Returns void

  • Set if the force multiplier.

    Parameters

    • multiplier: number

      The new value

    Returns void

  • Set the x component of the force.

    Parameters

    • x: number

      The new X component

    Returns void

  • Set the y component of the force.

    Parameters

    • y: number

      The new Y component

    Returns void

  • Parameters

    • syncData: ForceNetworkSyncData

    Returns void