diff options
| author | Mikkel Thestrup <mithe24@student.sdu.dk> | 2025-12-25 15:26:43 +0100 |
|---|---|---|
| committer | Mikkel Thestrup <mithe24@student.sdu.dk> | 2025-12-25 15:26:43 +0100 |
| commit | 202dac1dad3d86960af49d38eff0c690bf932a2c (patch) | |
| tree | db697d81df8facd08bc61e9cc43ab0c129853111 /app | |
| parent | b9a23720c7ebe67f84bec0af147fca9b132525ac (diff) | |
| download | scratchy-202dac1dad3d86960af49d38eff0c690bf932a2c.tar.gz scratchy-202dac1dad3d86960af49d38eff0c690bf932a2c.zip | |
Feat(CircleThatMoves): Added horizontal movement
Diffstat (limited to '')
| -rw-r--r-- | app/Example/CircleThatMoves.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/Example/CircleThatMoves.hs b/app/Example/CircleThatMoves.hs index 9d9aa8b..d173a3d 100644 --- a/app/Example/CircleThatMoves.hs +++ b/app/Example/CircleThatMoves.hs @@ -16,4 +16,12 @@ circSprite = NewSprite ( OnTargetReached s (\cl -> SetTarget s (nextCell D cl) (Pure ())) $ Pure () ) + $ OnKeyEvent (Char 'a') + ( OnTargetReached s + (\cl -> SetTarget s (nextCell L cl) (Pure ())) + $ Pure () ) + $ OnKeyEvent (Char 'd') + ( OnTargetReached s + (\cl -> SetTarget s (nextCell R cl) (Pure ())) + $ Pure () ) $ Pure ()) |