Docs > Class > Event
Event class
Constructor
Event(on_press, on_release, on_collide=None) ->
Event, with on_press, on_release and on_collide is a function. See the example
Simple game's source
to more details.
Abstraction Method
- press()
Override it in child class and call super().load() in __init__() to bind it to on_press event.
- release()
Override it in child class and call super().load() in __init__() to bind it to on_release event.
- collide()
Override it in child class and call super().load() in __init__() to bind it to on_collide event.