Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AutoOpenDoor<RoomType>

Represents an auto opening door for the AutoDoorsSystem.

See DoorEvents for events to listen to.

Type parameters

  • RoomType: Hostable

Hierarchy

Index

Methods

Deserialize

  • Deserialize(reader: HazelReader, spawn: boolean): void

DoUpdate

  • DoUpdate(delta: number): boolean

Serialize

close

  • close(): Promise<void>

emit

  • emit<Event>(event: Event): Promise<Event>

emitSerial

  • emitSerial<Event>(event: Event): Promise<Event>

emitSync

  • emitSync<Event>(event: Event): Event

getListeners

  • getListeners<Event>(event: string): Listener<Event>[]

off

  • off<EventName>(event: EventName, listener: Listener<DoorEvents<Hostable<any>>[EventName]>): void
  • off<K>(event: string, listener: Listener<K>): void

on

  • on<EventName>(event: EventName, listener: Listener<DoorEvents<Hostable<any>>[EventName]>): () => void
  • on<K>(event: string, listener: Listener<K>): () => void
  • Type parameters

    • EventName: "doors.open" | "doors.close"

    Parameters

    • event: EventName
    • listener: Listener<DoorEvents<Hostable<any>>[EventName]>

    Returns () => void

      • (): void
      • Returns void

  • Type parameters

    Parameters

    • event: string
    • listener: Listener<K>

    Returns () => void

      • (): void
      • Returns void

once

  • once<EventName>(event: EventName, listener: Listener<DoorEvents<Hostable<any>>[EventName]>): () => void
  • once<K>(event: string, listener: Listener<K>): () => void
  • Type parameters

    • EventName: "doors.open" | "doors.close"

    Parameters

    • event: EventName
    • listener: Listener<DoorEvents<Hostable<any>>[EventName]>

    Returns () => void

      • (): void
      • Returns void

  • Type parameters

    Parameters

    • event: string
    • listener: Listener<K>

    Returns () => void

      • (): void
      • Returns void

open

  • open(): Promise<void>

removeAllListeners

  • removeAllListeners(): void

removeListeners

  • removeListeners(event: string): void

setOpen

  • setOpen(isOpen: boolean): Promise<void>

wait

  • wait<EventName>(event: EventName): Promise<DoorEvents<Hostable<any>>[EventName]>
  • wait(event: string): Promise<BasicEvent>

waitf

  • waitf<EventName>(event: EventName, filter: (ev: DoorEvents<Hostable<any>>[EventName]) => boolean | Promise<boolean>): Promise<DoorEvents<Hostable<any>>[EventName]>
  • waitf<K>(event: string, filter: (ev: K) => boolean | Promise<boolean>): Promise<BasicEvent>
  • Type parameters

    • EventName: "doors.open" | "doors.close"

    Parameters

    • event: EventName
    • filter: (ev: DoorEvents<Hostable<any>>[EventName]) => boolean | Promise<boolean>
        • (ev: DoorEvents<Hostable<any>>[EventName]): boolean | Promise<boolean>
        • Parameters

          Returns boolean | Promise<boolean>

    Returns Promise<DoorEvents<Hostable<any>>[EventName]>

  • Type parameters

    Parameters

    • event: string
    • filter: (ev: K) => boolean | Promise<boolean>
        • (ev: K): boolean | Promise<boolean>
        • Parameters

          • ev: K

          Returns boolean | Promise<boolean>

    Returns Promise<BasicEvent>

Constructors

constructor

Properties

Readonly doorId

doorId: number

isOpen

isOpen: boolean

timer

timer: number

Generated using TypeDoc