{-# 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)