Skip to content

0.3.0 alpha

Pre-release
Pre-release
Compare
Choose a tag to compare
@Vassyli Vassyli released this 25 Apr 20:51
· 199 commits to master since this release

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).