0.3.0 alpha
Pre-release
Pre-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)
.