aboutsummaryrefslogtreecommitdiff
path: root/src/Input.elm
diff options
context:
space:
mode:
authorJoris2016-09-04 15:52:17 +0200
committerJoris2016-09-04 15:53:32 +0200
commit8714c3befcf3f9923cf72e8d992ba6d963c0e6e7 (patch)
treee5ab35a918a95cbfee2f90dc34f3fe57fac42593 /src/Input.elm
parentcda08750ac7cdd83e73c1110800bea39928ffed9 (diff)
Upgrade to elm 0.17.1
Diffstat (limited to 'src/Input.elm')
-rw-r--r--src/Input.elm28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/Input.elm b/src/Input.elm
deleted file mode 100644
index e18d8be..0000000
--- a/src/Input.elm
+++ /dev/null
@@ -1,28 +0,0 @@
-module Input where
-
-import Char exposing (toCode, KeyCode)
-import Keyboard exposing (keysDown, arrows, isDown)
-import Random
-import Time exposing (Time, fps)
-import Signal exposing (..)
-import Set exposing (Set)
-
-import Model.Vec2 exposing (Vec2)
-
-type alias Input =
- { dir : Vec2
- , inputKeysDown : Set KeyCode
- , delta : Time
- }
-
-getInput : Signal Input
-getInput =
- let delta = fps 24
- input = map3 Input (map recordIntToVec2 arrows) keysDown delta
- in sampleOn delta input
-
-recordIntToVec2 : {x : Int, y : Int} -> Vec2
-recordIntToVec2 {x, y} =
- { x = toFloat x
- , y = toFloat y
- }