18 lines
402 B
Haskell
18 lines
402 B
Haskell
|
{-# LANGUAGE OverloadedStrings #-}
|
||
|
module State.MainGame.Update where
|
||
|
|
||
|
import Affection
|
||
|
|
||
|
import Control.Monad (when)
|
||
|
|
||
|
import Control.Concurrent.STM
|
||
|
|
||
|
-- internal imports
|
||
|
|
||
|
import Types
|
||
|
|
||
|
mainGameUpdate :: GameData -> Double -> Affection ()
|
||
|
mainGameUpdate gd dt = do
|
||
|
progress <- liftIO $ atomically $ readTMVar (gameStateLoadProgress gd)
|
||
|
when (fst progress < 1) $ liftIO $ logIO Verbose (snd progress)
|