Define shape datatype
This commit is contained in:
@@ -137,10 +137,10 @@ bulConCr' bt p cr w
|
||||
ep = sp +.+ _btVel' bt
|
||||
mkwave = over worldEvents $ (.) (makeShockwaveAt [] p 15 4 1 white)
|
||||
{- | Hitting wall effects: create a spark, damage blocks. -}
|
||||
bulHitWall' :: Particle -> Point2 -> Wall -> World -> World
|
||||
bulHitWall' bt p wl w = damageBlocksBy 5 wl
|
||||
bulHitWall :: Particle -> Point2 -> Wall -> World -> World
|
||||
bulHitWall bt p wl w = damageBlocksBy 5 wl
|
||||
. smokeCloudAt dustcol 20 200 1 (addZ 20 pOut)
|
||||
$ createSparkCol 8 theCol pOut (reflectDir wl)
|
||||
. createSparkCol 8 theCol pOut (reflectDir wl)
|
||||
$ set randGen g
|
||||
w
|
||||
where
|
||||
@@ -212,8 +212,3 @@ hvBulHitWall' bt p x w = damageBlocksBy 5 x $ set randGen g $ foldr ($) w (spar
|
||||
|
||||
bulHitFF' :: Particle -> Point2 -> ForceField -> World -> World
|
||||
bulHitFF' _ _ _ = id
|
||||
{- | Typical effect: destroy on impact, damage creatures and blocks, create spark on walls. -}
|
||||
basicBulletEffect :: HitEffect
|
||||
basicBulletEffect = destroyOnImpact bulHitCr bulHitWall' bulHitFF'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user