Separate out concrete part of world
This commit is contained in:
@@ -84,19 +84,19 @@ tlsTimeRadColPos t rmax col (V3 x y z) = TLS
|
||||
}
|
||||
|
||||
makeTlsTimeRadColPos :: Int -> Float -> Point3 -> Point3 -> World -> World
|
||||
makeTlsTimeRadColPos i rad (V3 r g b) p = tempLightSources .:~ tlsTimeRadColPos i rad (V3 r g b) p
|
||||
makeTlsTimeRadColPos i rad (V3 r g b) p = cWorld . tempLightSources .:~ tlsTimeRadColPos i rad (V3 r g b) p
|
||||
|
||||
destroyLS :: Int -> World -> World
|
||||
destroyLS lsid w = w
|
||||
& lightSources . at lsid .~ Nothing
|
||||
& cWorld . lightSources . at lsid .~ Nothing
|
||||
& destroyLSFlashAt p3
|
||||
& originsIDsAt [MaterialSound Glass n | n <- [0,1,2]] (destroyMatS Glass) (xyV3 p3)
|
||||
where
|
||||
ls = w ^?! lightSources . ix lsid
|
||||
ls = w ^?! cWorld . lightSources . ix lsid -- unsafe
|
||||
p3 = _lsPos $ _lsParam ls
|
||||
|
||||
destroyLSFlashAt :: Point3 -> World -> World
|
||||
destroyLSFlashAt (V3 x' y' z') = tempLightSources .:~ tlsTimeRadFunPos 20 150
|
||||
destroyLSFlashAt (V3 x' y' z') = cWorld . tempLightSources .:~ tlsTimeRadFunPos 20 150
|
||||
(TLSFade 1 10)
|
||||
(addZ z' p)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user