hpi-swa-teaching / GameMecha

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

Register for Key Events [5] #57

Closed ekrebs5 closed 6 years ago

ekrebs5 commented 6 years ago

Story

As SWA student I want to register actions to morph in order to avoid checking for them every step.

PlayerMorph>>initialize self KeyHandler on: #W send: #jump to: self

Description

Why:
(What value does it have? For whom?)
What:

ekrebs5 commented 6 years ago

Patrick Input: ifKeyPressed: $d send: #jump to: self

the on/when would be according to squeak observer pattern

edit: maybe #dDown #dUp

ekrebs5 commented 6 years ago

for now: look at mouse still down and event handling

ekrebs5 commented 6 years ago

keeping current state of this feature, maybe leave this to SWA students