Refactor, try to limit dependencies
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user