Options
All
  • Public
  • Public/Protected
  • All
Menu

Collection of utilities and helper methods for testing and debugging purposes only

Hierarchy

  • DebugUtilities

Index

Constructors

constructor

Accessors

debugObject

  • get debugObject(): any
  • set debugObject(_object: any): void
  • Returns any

  • Parameters

    • _object: any

    Returns void

isDebugMode

  • get isDebugMode(): boolean
  • Returns boolean

isPerformanceInfo

  • get isPerformanceInfo(): boolean
  • Returns boolean

renderFunction

  • get renderFunction(): Function
  • Returns Function

Static instance

Methods

clear

  • clear(): void
  • Resets debug utilities by clearing debug object info, click history, click listeners, etc.

    Returns void

clickForCoordinates

  • clickForCoordinates(_on?: boolean, format?: string, concat?: boolean): void
  • Adds an event to game.input.onDown to output coordnates to the console

    Parameters

    • Default value _on: boolean = true
    • Default value format: string = "{x:X, y:Y}, "
    • Default value concat: boolean = false

    Returns void

debugLog

  • debugLog(_message: string): void
  • Prints a log to the console if isDebugMode is true

    Parameters

    • _message: string

    Returns void

pickPhaserObject

  • pickPhaserObject(): void
  • Adds a one time click listener to capture next input location, then determines if a group is present

    Returns void

sendDebugObjectToConsole

  • sendDebugObjectToConsole(): void
  • Sends the debugObject to the console for further debugging

    Returns void

setDebugMode

  • setDebugMode(_on: boolean, _debugObject?: any): void
  • Utilizes the render function to display various game (and debug object) info.

    Parameters

    • _on: boolean
    • Optional _debugObject: any

    Returns void

setPerformanceInfo

  • setPerformanceInfo(_on: boolean): void
  • Utilizes the render function to display performance related game info.

    Parameters

    • _on: boolean

    Returns void

updateRenderFunction

  • updateRenderFunction(): void
  • Returns void