Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

MaybeObserver<T>: Partial<Util.Observer<T>>

Defines an interface for something that might be an observer if a notify() is present

Type Parameters

  • T

Functions

  • addItemToArray<T>(item: T, array: T[]): boolean
  • Add an item to an array list if it doesn't already exist. Returns true if added, false if not and already exists in the array.

    deprecated

    Will be removed in v0.26.0

    Type Parameters

    • T

    Parameters

    • item: T
    • array: T[]

    Returns boolean

  • contains(array: any[], obj: any): boolean
  • See if an array contains something

    Parameters

    • array: any[]
    • obj: any

    Returns boolean

  • delay(milliseconds: number, clock?: Clock): Promise<void>
  • Create a promise that resolves after a certain number of milliseconds

    It is strongly recommended you pass the excalibur clock so delays are bound to the excalibur clock which would be unaffected by stop/pause.

    Parameters

    • milliseconds: number
    • Optional clock: Clock

    Returns Promise<void>

  • fail(message: never): never
  • Used for exhaustive checks at compile time

    Parameters

    • message: never

    Returns never

  • getPosition(el: HTMLElement): Vector
  • Find the screen position of an HTML element

    Parameters

    • el: HTMLElement

    Returns Vector

  • removeItemFromArray<T>(item: T, array: T[]): boolean
  • Remove an item from an list

    deprecated

    Will be removed in v0.26.0

    Type Parameters

    • T

    Parameters

    • item: T
    • array: T[]

    Returns boolean