Class TimerPart

Represents a timer.

Hierarchy

  • Child

    Hierarchy

    • TimerPart

Constructors

Properties

fileChild: FileChild
fileShape: FileShape

Accessors

  • get color(): string
  • The color of this shape.

    Returns string

  • set color(value: string): void
  • Parameters

    • value: string

    Returns void

  • get shapeId(): string
  • The shapeId of this shape. Determines the model and behavior in-game.

    Returns string

  • set shapeId(value: string): void
  • Parameters

    • value: string

    Returns void

Methods

  • Connects this child to another child. Both children must be interactable.

    Parameters

    • other: number | Child

      The Child object or the ID of the child to connect to.

    Returns void

  • Disconnects this child from another child.

    Parameters

    • other: number | Child

      The Child object or the ID of the child to disconnect from.

    Returns void

  • Gets the number of total seconds (including decimals) the timer delays signals, using both the seconds value and the ticks value.

    Returns

    The number of seconds the timer delays signals.

    Returns number

  • Sets the number of total seconds (including decimals) the timer delays signals, converting it to seconds and ticks.

    Parameters

    • seconds: number

      The number of seconds the timer should delay signals.

    Returns void

  • Attempts to convert a Child to a TimerPart. Only returns if the Child's file object is a TimerPart.

    Returns

    The converted TimerPart, or undefined if the Child is not a TimerPart.

    Parameters

    • potential: Child

      The Child to convert.

    Returns undefined | TimerPart

  • Creates a timer.

    Parameters

    • position: Vector3

      The position of the timer.

    • rotation: Axis

      The rotation of the timer.

    • Optional color: string

      The color of the timer. Fallbacks to the timer's default color.

    • seconds: number = 0

      The number of seconds the timer should delay signals. Defaults to 0.

    • ticks: number = 0

      The number of ticks (1/40s) the timer should delay signals. Added onto the seconds. Defaults to 0.

    Returns TimerPart

Generated using TypeDoc