Generalise flame flicker, cleanup
This commit is contained in:
@@ -14,11 +14,13 @@ module Dodge.WorldEvent.Flash
|
||||
, laserGunFlashAt
|
||||
, teslaGunFlashAt
|
||||
, muzFlareAt
|
||||
, flameFlicker
|
||||
)
|
||||
where
|
||||
import Dodge.Data
|
||||
import Dodge.LightSources.Lamp
|
||||
import Dodge.WorldEvent.HelperParticle
|
||||
import Dodge.Default
|
||||
import Picture
|
||||
import Geometry
|
||||
|
||||
@@ -65,3 +67,15 @@ explosionFlashAt p = tempLightSources %~ (tLightTimedIntensity 20 150 intensityF
|
||||
|
||||
sparkFlashAt :: Point2 -> World -> World
|
||||
sparkFlashAt _ = id
|
||||
|
||||
flameFlicker :: Particle -> World -> World
|
||||
flameFlicker pt
|
||||
| _btTimer' pt `mod` 5 == 0 = tempLightSources %~ (theLight :)
|
||||
| otherwise = id
|
||||
where
|
||||
V2 x y = _btPos' pt
|
||||
theLight = defaultTLS
|
||||
{ _tlsPos = V3 x y 10
|
||||
, _tlsRad = 70
|
||||
, _tlsIntensity = V3 0.5 0 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user