From 2258ef984fefde41711d4c883baf582b7e581155 Mon Sep 17 00:00:00 2001 From: Joris Date: Wed, 30 Dec 2015 13:35:01 +0100 Subject: Make the player bigger with each point --- src/Model/Cloud.elm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Model/Cloud.elm') 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 -- cgit v1.2.3