Add z levels to shockwaves
This commit is contained in:
@@ -76,8 +76,8 @@ makeExplosionAt p' vel' w =
|
||||
& soundStart (Explosion (w ^. cWorld . lWorld . lClock)) (p) bangS Nothing
|
||||
& addFlames
|
||||
& cWorld . lWorld . worldEvents
|
||||
.:~ MakeTempLight (LSParam (addZ 20 p) 150 (V3 1 0.5 0)) 20
|
||||
& makeShockwaveAt [] p 50 50 1 white
|
||||
.:~ MakeTempLight (LSParam (p') 150 (V3 1 0.5 0)) 20
|
||||
& makeShockwaveAt [] p' 50 50 1 white
|
||||
where
|
||||
p = p' ^. _xy
|
||||
fVs = fmap (`v2z` 0) $ replicateM 100 (randInCirc 1) & evalState $ _randGen w
|
||||
|
||||
@@ -13,7 +13,7 @@ makeShockwaveAt ::
|
||||
-- | IDs of invulnerable creatures.
|
||||
[Int] ->
|
||||
-- | Center of shockwave.
|
||||
Point2 ->
|
||||
Point3 ->
|
||||
-- | Maximal radius.
|
||||
Float ->
|
||||
-- | Damage caused per frame.
|
||||
@@ -41,7 +41,7 @@ makeShockwaveAt is p rad dam push col =
|
||||
|
||||
{- Create a shockwave going from an outside circle into a center point. -}
|
||||
inverseShockwaveAt ::
|
||||
Point2 -> -- Center position
|
||||
Point3 -> -- Center position
|
||||
Float -> -- Radius
|
||||
Int -> -- Damage
|
||||
Float -> -- Push amount
|
||||
|
||||
Reference in New Issue
Block a user