Allow for concurrent effects

This commit is contained in:
2022-08-16 16:02:09 +01:00
parent 919a179283
commit 26e88f059a
14 changed files with 181 additions and 53 deletions
+6 -2
View File
@@ -6,6 +6,7 @@ import Dodge.TestString
import Dodge.Data
import Dodge.StartNewGame
import Dodge.Initialisation
import Dodge.Concurrent
--import Dodge.LevelGen
import Dodge.Update
import Dodge.Event
@@ -40,12 +41,13 @@ main = do
sizey = floor $ _windowY con
posx = _windowPosX con
posy = _windowPosY con
setupLoop
setupConLoop
20
(T.pack "Simple Game Loop")
(winConfig sizex sizey (Just (posx,posy)))
theCleanup
(firstWorldLoad con)
conTest
theUpdateStep
(flip handleEvent)
@@ -77,9 +79,11 @@ firstWorldLoad theConfig = do
,_uvConfig = theConfig
,_preloadData = pdata
,_menuLayers = []
,_savedWorlds = M.empty
, _uvIOEffects = return
, _uvTestString = testStringInit
, _uvConcMessage = ""
, _quickSave = Nothing
, _uvConcEffects = Nothing
}
theUpdateStep :: Universe -> IO Universe