23 lines
514 B
Haskell
23 lines
514 B
Haskell
module Input
|
|
(
|
|
-- Handle all input for RPG-Engine
|
|
handleAllInput
|
|
) where
|
|
|
|
import Game
|
|
import State
|
|
import InputHandling
|
|
|
|
import Graphics.Gloss.Interface.IO.Game
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
handleAllInput :: InputHandler Game
|
|
handleAllInput = composeInputHandlers [
|
|
handleSpecialKey KeySpace setNextState
|
|
]
|
|
|
|
-- Go to the next stage of the Game
|
|
setNextState :: Game -> Game
|
|
setNextState game = game{ state = newState }
|
|
where newState = nextState $ state game
|