trigger(eventName,hash) , method of game

Trigger the event using (optional) a hash with data.

The function gets called when the event is triggered.

Parameters:
name type description
eventName string a standard or custom event name. See ??
hash Object event data.
// Trigger that there is a highscore.

UB.game.trigger("highscore", {score: 9999});

See all methods of the api.