Move bullet trajectory into bullet update function

This commit is contained in:
2022-07-17 10:31:34 +01:00
parent c9f7f39f22
commit 7d6407bebc
15 changed files with 159 additions and 121 deletions
+3 -2
View File
@@ -1,7 +1,7 @@
module Dodge.Wall.DamageEffect where
import Dodge.Data
import Dodge.Bullet
import Dodge.Particle.Spark
import Dodge.Particle.Bullet.Spawn
import Dodge.Base.Wall
import Dodge.Wall.Dust
import Dodge.Block
@@ -135,7 +135,8 @@ 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)
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