diff options
author | Joris | 2015-12-30 13:35:01 +0100 |
---|---|---|
committer | Joris | 2015-12-30 13:35:01 +0100 |
commit | 2258ef984fefde41711d4c883baf582b7e581155 (patch) | |
tree | a15cdae0c8a77a628ee49959037a1000687f3a2c /src/Model/Cloud.elm | |
parent | 1cf6bc1ad9209e4f3f2fcbc129f2577e74e94c99 (diff) |
Make the player bigger with each point
Diffstat (limited to 'src/Model/Cloud.elm')
-rw-r--r-- | src/Model/Cloud.elm | 12 |
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 |