This module contains all the event trigger classes that come with Rubygame.
The only requirement for an event trigger is this:
You can make your own custom event trigger classes and use them in an EventHook if they meet that requirement.
NOTE: The match? method may be called many times every second, even if there is no matching event. So, you should try to keep the method simple and fast, to have the least impact on your game’s framerate.
Here is an overview of the event trigger classes that come with Rubygame as of version 2.5:
|AndTrigger:||Holds multiple other triggers, and matches if ALL of the triggers match the event.|
|OrTrigger:||Holds multiple other triggers, and matches if ONE OR MORE of the triggers match the event.|
|AttrTrigger:||Matches if the event’s attributes have the expected values.|
|BlockTrigger:||Passes the event to a custom code block to check whether it matches.|
|InstanceOfTrigger:||Matches if the event is an instance of a particular class.|
|KeyPressTrigger:||Matches certain KeyPressed events.|
|KeyReleaseTrigger:||Matches certain KeyReleased events.|
|KindOfTrigger:||Matches if the event is kind_of? a particular class or module.|
|MousePressTrigger:||Matches certain MousePressed events.|
|MouseMoveTrigger:||Matches certain MouseMoved events.|
|MouseReleaseTrigger:||Matches certain MouseReleased events.|
|TickTrigger:||Matches ClockTicked events.|
|YesTrigger:||Matches every event, no matter what.|