Move bullet bouncing into separate datatype field
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
module Dodge.Wall.DamageEffect where
|
||||
import Dodge.Data
|
||||
import Dodge.Bullet
|
||||
import Dodge.Spark
|
||||
import Dodge.Base.Wall
|
||||
import Dodge.Wall.Dust
|
||||
@@ -132,15 +131,6 @@ dirtWallDamage dm wl = case _dmType dm of
|
||||
|
||||
wallDamageEffect :: Damage -> Wall -> World -> World
|
||||
wallDamageEffect dm wl w = case _dmEffect dm of
|
||||
BounceBullet bt -> w & instantBullets .:~ thebouncer
|
||||
where
|
||||
reflectVel = reflVelWall wl (_buVel bt)
|
||||
thebouncer = aBulAt Nothing --id
|
||||
pOut reflectVel (_buDrag bt) (_buHitEff bt) (_buWidth bt) BasicBulletTrajectory
|
||||
& buTimer .~ _buTimer bt - 1
|
||||
pOut = p +.+ squashNormalizeV (sp -.- p)
|
||||
p = _dmAt dm
|
||||
sp = _dmFrom dm
|
||||
DamageSpawn f -> w & instantParticles .:~ thepart
|
||||
& randGen .~ g
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user