move it faster

This commit is contained in:
nek0 2017-03-22 16:59:35 +01:00
parent ef40eed917
commit bbc7142b74

View file

@ -164,8 +164,8 @@ handle (SDL.KeyboardEvent dat) =
nmap <- return $ M.adjust
(updateProperties $ props $ prop "x" $
case SDL.keysymKeycode $ SDL.keyboardEventKeysym dat of
SDL.KeycodeLeft -> xpos - 5
SDL.KeycodeRight -> xpos + 5
SDL.KeycodeLeft -> xpos - 20
SDL.KeycodeRight -> xpos + 20
_ -> xpos
)
"rect"
@ -184,7 +184,7 @@ handle (SDL.KeyboardEvent dat) =
then
case SDL.keysymKeycode $ SDL.keyboardEventKeysym dat of
SDL.KeycodeLeft ->
if bgPos <= 0 then bgPos + 5 else bgPos
if bgPos <= 0 then bgPos + 20 else bgPos
SDL.KeycodeRight ->
bgPos
_ -> bgPos
@ -193,7 +193,7 @@ handle (SDL.KeyboardEvent dat) =
SDL.KeycodeLeft ->
bgPos
SDL.KeycodeRight ->
if True {- TODO: CHANGE-} then bgPos - 5 else bgPos
if bgPos >= -2489 then bgPos - 20 else bgPos
_ -> bgPos
)
"background"
@ -206,11 +206,11 @@ handle (SDL.KeyboardEvent dat) =
then
xpos
else
xpos - 5
xpos - 20
SDL.KeycodeRight ->
if xpos < 40
then
xpos + 5
xpos + 20
else
xpos
_ -> xpos