Refactor flash lighting, determine (projected) namespace

This commit is contained in:
2021-03-23 17:39:34 +01:00
parent e0d49cdf57
commit 3e2eaeece2
4 changed files with 53 additions and 122 deletions
+2 -2
View File
@@ -663,7 +663,7 @@ aTeslaArc cid w = aTeslaArc' cid
aTeslaArc' :: Int -> World -> World
aTeslaArc' cid w =
flareAt' cyan 0.03 0.1 (pos +.+ 5 *.* unitVectorAtAngle dir)
teslaGunFlashAt (pos +.+ 5 *.* unitVectorAtAngle dir)
$ over projectiles (IM.insert i (makeTeslaArcAt i pos dir))
$ set randGen g w
where cr = (_creatures w IM.! cid)
@@ -676,7 +676,7 @@ aTeslaArc' cid w =
aLaser :: Int -> World -> World
aLaser cid w = over particles' ( (:) (makeLaserAt phaseV pos dir (Just cid)))
$ soundFrom LasSound 24 1 0
$ flareAt' yellow 0.02 0.05 (pos +.+ 5 *.* unitVectorAtAngle dir)
$ laserGunFlashAt (pos +.+ 5 *.* unitVectorAtAngle dir)
w
where cr = (_creatures w IM.! cid)
i = newProjectileKey w