Commit before moving configuration outside of world
This commit is contained in:
@@ -22,8 +22,8 @@ import Dodge.WorldEvent.HelperParticle
|
||||
--import Dodge.Default
|
||||
import Picture
|
||||
import Geometry
|
||||
import LensHelp
|
||||
|
||||
import Control.Lens
|
||||
import System.Random
|
||||
|
||||
{- Cyan flash. -}
|
||||
@@ -35,7 +35,7 @@ laserGunFlashAt :: Point3 -> World -> World
|
||||
laserGunFlashAt = flareCircleAt yellow 0.2
|
||||
|
||||
muzFlareAt :: Color -> Point3 -> Float -> World -> World
|
||||
muzFlareAt col tranv dir w = w & particles %~ (theFlare :)
|
||||
muzFlareAt col tranv dir w = w & particles .:~ theFlare
|
||||
where
|
||||
theFlare = Particle
|
||||
{ _ptDraw = const $ setLayer 1 . translate3 tranv $ theShape
|
||||
@@ -49,7 +49,7 @@ muzFlareAt col tranv dir w = w & particles %~ (theFlare :)
|
||||
(a:b:c:d:_) = randomRs (2,20) (_randGen w)
|
||||
|
||||
flareCircleAt :: Color -> Float -> Point3 -> World -> World
|
||||
flareCircleAt col alphax tranv = particles %~ (theFlareCircle :)
|
||||
flareCircleAt col alphax tranv = particles .:~ theFlareCircle
|
||||
where
|
||||
theFlareCircle = Particle
|
||||
{ _ptDraw = const . setLayer 1 . translate3 tranv
|
||||
@@ -58,7 +58,7 @@ flareCircleAt col alphax tranv = particles %~ (theFlareCircle :)
|
||||
}
|
||||
|
||||
explosionFlashAt :: Point2 -> World -> World
|
||||
explosionFlashAt p = tempLightSources %~ (tlsTimeRadFunPos 20 150 intensityFunc (addZ 20 p) :)
|
||||
explosionFlashAt p = tempLightSources .:~ tlsTimeRadFunPos 20 150 intensityFunc (addZ 20 p)
|
||||
where
|
||||
intensityFunc x
|
||||
| x < 10 = 1 / (10 - fromIntegral x)
|
||||
@@ -69,7 +69,7 @@ sparkFlashAt _ = id
|
||||
|
||||
flameFlicker :: Particle -> World -> World
|
||||
flameFlicker pt
|
||||
| _btTimer' pt `mod` 5 == 0 = tempLightSources %~ (theLight :)
|
||||
| _btTimer' pt `mod` 5 == 0 = tempLightSources .:~ theLight
|
||||
| otherwise = id
|
||||
where
|
||||
V2 x y = _btPos' pt
|
||||
|
||||
Reference in New Issue
Block a user