Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+5 -4
View File
@@ -1,7 +1,8 @@
module Dodge.LightSource.Update where
import Control.Lens
import Dodge.Data.LightSource
import Geometry
import Control.Lens
updateTempLightSource :: TLSUpdate -> TempLightSource -> Maybe TempLightSource
updateTempLightSource tlsu = case tlsu of
@@ -17,8 +18,8 @@ fadeTLS startcol x tls
| otherwise = Just $ tls & tlsParam . lsCol .~ startcol -- this is wasteful, should be set once at begining
where
t = _tlsTime tls
timerTLS :: TempLightSource -> Maybe TempLightSource
timerTLS t
timerTLS t
| _tlsTime t <= 0 = Nothing
| otherwise = Just $ t & tlsTime -~ 1
| otherwise = Just $ t & tlsTime -~ 1