Legend of the Green Dragon v0.3.0-alpha Release Notes

Release Date: 2017-04-25 // over 5 years ago
  • Preview 0.3.0-alpha introduces a change in the event API to allow stricter control of context parameters:

    public static function handleEvent(Game $g, EventContext $context): EventContext;

    EventContext gives access to the called event name via Event() and to the matched pattern via getMatchingPattern. Depending on the type of the EventContextData, different fields are available and modifyable via getDataField($field) and setDataField($field, $value).