aboutsummaryrefslogtreecommitdiff
path: root/src/Game/Entities/Player.hs
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-03-02 12:54:47 +0000
committerJuan J. Martinez <jjm@usebox.net>2023-03-02 12:54:47 +0000
commite5cbf917ad8b12b48932bc4fa13a044bc8159a74 (patch)
tree41511ca9f1447643ac921b2294f5dab8a62731e2 /src/Game/Entities/Player.hs
parent5dd9180606e935ee5a7c1637773fdfc3277677ca (diff)
downloadspace-plat-hs-e5cbf917ad8b12b48932bc4fa13a044bc8159a74.tar.gz
space-plat-hs-e5cbf917ad8b12b48932bc4fa13a044bc8159a74.zip
Even less IORef
Also reviewed comments and made the action to add effects more general.
Diffstat (limited to 'src/Game/Entities/Player.hs')
-rw-r--r--src/Game/Entities/Player.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Game/Entities/Player.hs b/src/Game/Entities/Player.hs
index 87e8a7a..a69799b 100644
--- a/src/Game/Entities/Player.hs
+++ b/src/Game/Entities/Player.hs
@@ -48,7 +48,7 @@ updateVertical isBlocked jump down e
-- make jumping easier with "Coyote time"
|| (e.gravity /= gravityOff && (e.gravity < gravityDown || e.gravity > jumpLimit)) =
e
- | not down = e {jumping = True, gravity = gravityUp, frame = jumpFrame, actions = [ActionAddDustEffect e.x (e.y + 8)]}
+ | not down = e {jumping = True, gravity = gravityUp, frame = jumpFrame, actions = [ActionAddEffect e.x (e.y + 8) "dust"]}
-- go down a 8 pixel tall platform; not ideal to have these values hardcoded here
-- but to be fair, the player height/width is hardcoded as well
| down