This commit is contained in:
2022-07-16 18:07:43 +01:00
parent 11732358ed
commit 22adcb89e0
7 changed files with 31 additions and 34 deletions
+1 -1
View File
@@ -31,6 +31,6 @@ defaultTLS = TLS
, _tlsTime = 1
}
where
f _ t
f t
| _tlsTime t <= 0 = Nothing
| otherwise = Just $ t & tlsTime -~ 1
+13 -16
View File
@@ -10,10 +10,7 @@ import Geometry.Zone
--import Picture
import Geometry.Data
import Geometry.Polygon
--import Picture.Texture
--import Data.Preload
import Control.Lens
import System.Random
import qualified Data.IntMap.Strict as IM
import qualified Data.Map as M
@@ -85,7 +82,7 @@ defaultWorld = World
, _carteRot = 0
}
, _lightSources = IM.empty
, _tempLightSources = [youLight]
, _tempLightSources = []
, _closeObjects = []
, _rbOptions = NoRightButtonOptions
, _seenLocations = IM.fromList
@@ -121,15 +118,15 @@ defaultWorld = World
}
defaultWorldHammers :: M.Map WorldHammer HammerPosition
defaultWorldHammers = M.fromSet (const HammerUp) $ S.fromList [minBound.. maxBound]
youLight :: TempLightSource
youLight = TLS
{ _tlsParam = LSParam
{_lsPos = V3 0 0 0
,_lsRad = 300
,_lsCol = 0.1
}
,_tlsUpdate = \w _ -> Just (youLight & tlsParam . lsPos .~ f (_crPos $ you w))
,_tlsTime = 0
}
where
f (V2 x y) = V3 x y 100
--youLight :: TempLightSource
--youLight = TLS
-- { _tlsParam = LSParam
-- {_lsPos = V3 0 0 0
-- ,_lsRad = 300
-- ,_lsCol = 0.1
-- }
-- ,_tlsUpdate = \w _ -> Just (youLight & tlsParam . lsPos .~ f (_crPos $ you w))
-- ,_tlsTime = 0
-- }
-- where
-- f (V2 x y) = V3 x y 100