Add extra flare to laser

This commit is contained in:
2022-03-25 19:04:13 +00:00
parent bd46d3f110
commit ae7fbe29c2
6 changed files with 16 additions and 28 deletions
+4 -6
View File
@@ -3,20 +3,18 @@ Effects centered on creatures.
These are typically item effects, and typical occur when an item is explictly used. -}
module Dodge.Item.Weapon.UseEffect where
import Dodge.Data
--import Dodge.Zone
--import Dodge.Picture.Layer
import Picture
import Geometry
import LensHelp
import Data.Maybe
import Control.Lens
import qualified Data.IntMap.Strict as IM
{- | Creates an outwardly increasing circle that draws creatures, even those behind walls. -}
aSonarPulse :: Creature -> World -> World
aSonarPulse cr = over particles (sonarPulseAt (_crPos cr) :)
aSonarPulse cr = instantParticles .:~ sonarPulseAt (_crPos cr)
{- | Creates an outwardly increasing circle that displays walls, even those behind other walls. -}
aRadarPulse :: Creature -> World -> World
aRadarPulse cr = over particles (radarPulseAt (_crPos cr) :)
aRadarPulse cr = instantParticles .:~ radarPulseAt (_crPos cr)
{- | Radar blip at a point. -}
blipAt :: Point2 -> Color -> Int -> Particle
blipAt p col i = Particle
@@ -84,7 +82,7 @@ mvRadar _ _ w _ = (w, Nothing)
-- )
-- where
-- pic = onLayerL [levLayer ShadowLayer, 1] $ pictures sweepPics
-- putBlips = over worldEvents ( over particles (blips ++) . )
-- putBlips = over worldEvents ( over instantParticles (blips ++) . )
-- blips = map (\bp -> blipAt bp (withAlpha (0.5*globalAlpha) red) 50) circPoints
-- circPoints = mapMaybe (\wl -> uncurry collidePointCircCorrect (_wlLine wl) r p)
-- $ map (over wlLine swp) (IM.elems $ wallsAlongCirc p r w)