From a1a3dbadffaaab290a6b6bb4b61df787d3b8ffdd Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Fri, 3 Oct 2014 16:18:24 +0200 Subject: Adding a target to catch --- src/Input.elm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Input.elm') diff --git a/src/Input.elm b/src/Input.elm index d8614b0..69e7503 100644 --- a/src/Input.elm +++ b/src/Input.elm @@ -16,7 +16,7 @@ getInput : Signal Input getInput = let dtSignal = delta dirSignal = lift recordIntToVec2 Keyboard.arrows - randomFloatsSignal = Random.floatList (lift (\_ -> 3) dtSignal) + randomFloatsSignal = Random.floatList (lift (\_ -> 5) dtSignal) randomValuesSignal = lift floatsToRandomValues randomFloatsSignal in sampleOn dtSignal <| Input <~ dirSignal ~ dtSignal @@ -32,8 +32,10 @@ recordIntToVec2 {x, y} = } floatsToRandomValues : [Float] -> RandomValues -floatsToRandomValues [enemyAngle, enemyX, enemyY] = +floatsToRandomValues [enemyAngle, enemyX, enemyY, targetX, targetY] = { enemyAngle = enemyAngle , enemyX = enemyX , enemyY = enemyY + , targetX = targetX + , targetY = targetY } -- cgit v1.2.3