omega-game-engine
    Preparing search index...

    A simple event emitter class that allows for subscribing to and emitting custom events.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Emits an event, calling all subscribed callback functions with the provided data. *

      Parameters

      • event: string

        The name of the event to emit. *

      • Optionaldata: any

        Optional data to pass to the callback functions. *

      Returns void

    • Subscribes a callback function to a specific event. *

      Parameters

      • event: string

        The name of the event to subscribe to. *

      • callback: Function

        The function to call when the event is emitted. *

      Returns void