hpi-swa-teaching / GameMecha

A library providing implementations for common patterns in Squeak/Smalltalk game development.
MIT License
12 stars 2 forks source link

[GMRegisterKeyEventsAcceptance / Docs] Indicate that it’s necessary to call `gmEvaluateRegisteredEvents` in `step` #74

Open tillprochaska opened 5 years ago

tillprochaska commented 5 years ago

The GMRegisterKeyEventsAcceptance is a pretty good example to see how to use the GMKeyHandler class. While it might obvious to developers that have some experience with Squeak, it could help to add a short comment in the initialize method to point out that you need to call gmEvaluateRegisteredEvents in the step method, e. g.:

First of all, we need to specify that this Morph should listen to keyboard input. We use our GMKeyHandler (gmRegisterToKeyHandler), because it is plattorm independent. You will also have to call gmEvaluateRegisteredEvents in the step method. Have a look at it for more information.