Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GameEvent<T>

Base event type in Excalibur that all other event types derive from. Not all event types are thrown on all Excalibur game objects, some events are unique to a type, others are not.

Type parameters

  • T

Hierarchy

Index

Properties

Protected _name

_name: string = ""

Protected _path

_path: Actor[] = []

Holds the whole path from the Root to the event target

bubbles

bubbles: boolean = true

determines, if event bubbles to the target's ancestors

target

target: T

Target object for this event.

Accessors

eventPath

  • get eventPath(): Actor[]

name

  • get name(): string
  • Returns name of the event

    Returns string

Methods

Protected _onActionEnd

  • _onActionEnd(_actor?: Actor): void

Protected _onActionStart

  • _onActionStart(_actor?: Actor): void

action

  • action(): void
  • Action, that calls when event happens

    Returns void

layPath

  • layPath(actor: Actor): void

propagate

  • propagate(): void
  • Propagate event further through event path

    Returns void

stopPropagation

  • stopPropagation(): void
  • Prevents event from bubbling

    Returns void