API Docs for: v2.1.0
Show:

CGSGEvent Class

Extends CGSGObject
Module: Collision

This class represents an event fired by observable (through event manager) to observers (the handlers) functions.

Constructor

CGSGEvent

(
  • trigger
  • data
)

Parameters:

  • trigger Object

    the object which has triggered the event (could be different from the observable object)

  • data Object

    an object of any type

Item Index

Methods

Methods

render

(
  • context
  • width
  • height
)

This function must be filled by the inherited classes.

Parameters:

  • context CanvasRenderingContext2D

    context containing the image

  • width Number

    width for the image to be modified

  • height Number

    height for the image to be modified

render

(
  • context
  • width
  • height
)

This function must be filled by the inherited classes.

Parameters:

  • context CanvasRenderingContext2D

    context containing the image

  • width Number

    width for the image to be modified

  • height Number

    height for the image to be modified

render

(
  • context
  • width
  • height
)

This function must be filled by the inherited classes.

Parameters:

  • context CanvasRenderingContext2D

    context containing the image

  • width Number

    width for the image to be modified

  • height Number

    height for the image to be modified

Properties

data

Object the wrapped data

Data wrapped in this event

observable

Object the observable object

Fields that should be filled by object which triggers this event

Default: null

propagate

Boolean true if next events should be dispatched, false otherwise

Flags which indicates if events which are going to be dispatched should be ignored

Default: true

trigger

Object the trigger

Object which has created this event

type

String the type of event

Fields that should be filled by object which triggers this event

Default: null