aboutsummaryrefslogtreecommitdiff
path: root/src/Model/Cloud.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model/Cloud.elm')
-rw-r--r--src/Model/Cloud.elm12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Model/Cloud.elm b/src/Model/Cloud.elm
index 603477b..26b4104 100644
--- a/src/Model/Cloud.elm
+++ b/src/Model/Cloud.elm
@@ -30,12 +30,12 @@ initCloud =
, lastSpawn = -spawn
}
-playerPointsCollision : Float -> Player -> List Point -> Bool
-playerPointsCollision time player points =
- let collision = playerPointCollision time player
+playerPointsCollision : Float -> Player -> Float -> List Point -> Bool
+playerPointsCollision elapsedTime player playerSize points =
+ let collision = playerPointCollision elapsedTime player playerSize
in List.length (List.filter collision points) > 0
-playerPointCollision : Float -> Player -> Point -> Bool
-playerPointCollision time player point =
- let pointPos = pointMove point time
+playerPointCollision : Float -> Player -> Float -> Point -> Bool
+playerPointCollision elapsedTime player playerSize point =
+ let pointPos = pointMove point elapsedTime
in (distance pointPos player.pos) < pointSize + playerSize