aboutsummaryrefslogtreecommitdiff
path: root/src/EnemyState.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/EnemyState.elm')
-rw-r--r--src/EnemyState.elm10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/EnemyState.elm b/src/EnemyState.elm
index 81766bf..fed2981 100644
--- a/src/EnemyState.elm
+++ b/src/EnemyState.elm
@@ -18,12 +18,12 @@ initEnemyState =
, lastSpawn = -spawn
}
-playerEnemyCollision : Float -> Player -> Enemy -> Bool
-playerEnemyCollision time player enemy =
- let enemyPos = enemyMove enemy time
- in (distance enemyPos player.pos) < enemySize + playerSize
-
playerEnemiesCollision : Float -> Player -> [Enemy] -> Bool
playerEnemiesCollision time player enemies =
let collision = playerEnemyCollision time player
in length (filter collision enemies) > 0
+
+playerEnemyCollision : Float -> Player -> Enemy -> Bool
+playerEnemyCollision time player enemy =
+ let enemyPos = enemyMove enemy time
+ in (distance enemyPos player.pos) < enemySize + playerSize