Refactor light sources
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
module Dodge.Default.World
|
||||
where
|
||||
module Dodge.Default.World where
|
||||
import Dodge.Data
|
||||
import Dodge.Base
|
||||
import Dodge.Config.KeyConfig
|
||||
--import Dodge.Config.KeyConfig
|
||||
import Dodge.Bounds
|
||||
--import Dodge.Menu
|
||||
--import Picture
|
||||
@@ -10,6 +9,7 @@ import Geometry.Data
|
||||
--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
|
||||
@@ -73,7 +73,7 @@ defaultWorld = World
|
||||
,(1, (const (V2 0 0) , "START POSITION"))
|
||||
]
|
||||
, _selLocation = 0
|
||||
, _keyConfig = defaultKeyConfigSDL
|
||||
--, _keyConfig = defaultKeyConfigSDL
|
||||
, _config = defaultConfig
|
||||
, _sideEffects = return
|
||||
, _inventoryMode = TopInventory
|
||||
@@ -89,10 +89,12 @@ defaultWorld = World
|
||||
}
|
||||
youLight :: TempLightSource
|
||||
youLight =
|
||||
TLS { _tlsPos = V3 0 0 0
|
||||
,_tlsRad = 300
|
||||
,_tlsIntensity = 0.1
|
||||
,_tlsUpdate = \w _ -> Just (youLight {_tlsPos = f $ _crPos (you w)})
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user