Class PhysicsLayers

Physics collision layer matrix.

Methods

  • Creates a physics collision layer and adds it to the matrix.

    Parameters

    • name: string

      The unique name for the layer.

    Returns boolean

    Whether the layer was successfully created.

  • Finds a physics collision layer with the specified name.

    Parameters

    • name: string

      The layer name.

    Returns boolean

    Whether a layer with the specified name was found.

  • Whether collisions should be detected between the two physics collision layers.

    Parameters

    • first: string

      The first layer.

    • second: string

      The second layer.

    Returns boolean

    True if collisions should be detected, false otherwise.

  • Removes the physics collision layer with the specified name.

    Parameters

    • name: string

      The layer name.

    Returns boolean

    Whether the layer was removed.

  • Renames a physics collision layer.

    Parameters

    • oldName: string

      The current name for the layer to rename.

    • newName: string

      The new name for the layer.

    Returns boolean

    Whether the layer was renamed.

  • Whether collisions should be detected between the two physics collision layers.

    Parameters

    • first: string

      The first layer.

    • second: string

      The second layer.

    • value: boolean

      True if collisions should be detected, false otherwise.

    Returns void

Generated using TypeDoc