Cleanup particles slightly

This commit is contained in:
2021-09-03 17:26:21 +01:00
parent 111b86d2df
commit fd85093833
10 changed files with 64 additions and 95 deletions
+8 -4
View File
@@ -645,12 +645,16 @@ aTeslaArc :: Creature -> World -> World
aTeslaArc cr w
= teslaGunFlashAt (pos +.+ 5 *.* unitVectorAtAngle dir)
$ set randGen g w
& particles %~ (makeTeslaArcAt pos dir :)
& particles %~ (makeTeslaArcAt col pos dir :)
where
pos = _crPos cr +.+ ((_crRad cr +1) *.* unitVectorAtAngle dir)
+.+ sideOffset *.* vNormal (unitVectorAtAngle dir)
(sideOffset,g) = randomR (-5,5) $ _randGen w
pos = _crPos cr +.+ (_crRad cr +1) *.* unitVectorAtAngle dir
dir = _crDir cr
(colid,g) = randomR (0::Int,3) $ _randGen w
col = chooseColor colid
chooseColor 0 = white
chooseColor 1 = azure
chooseColor 2 = blue
chooseColor _ = cyan
remoteShellPic' :: Projectile -> Picture
remoteShellPic' pj