Advertisement
NLinker

Update haskell code on the fly

Mar 10th, 2017
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- https://github.com/BartAdv/hackslash/blob/master/src/DevelMain.hs
  2.  
  3. module DevelMain (update) where
  4.  
  5. import Rapid
  6.  
  7. import Freeablo
  8. import Game
  9. import Reflex.SDL.Host
  10.  
  11. update :: IO ()
  12. update = rapid 0 $ \r -> do
  13.   initFAIO
  14.   _ <- createRef r "renderer" $ initRenderer 1920 1080 False
  15.   spriteManager <- createRef r "spriteManager" createSpriteManager
  16.   town <- createRef r "town" createTownLevel
  17.   restart r "loop" $
  18. sdlHost (Just ticksPerSecond) (game spriteManager town)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement