Move bullet trajectory into bullet update function
This commit is contained in:
@@ -2,7 +2,7 @@ module Dodge.Creature.Damage where
|
||||
import Dodge.Data
|
||||
import Dodge.Creature.Test
|
||||
import Dodge.Particle.Spark
|
||||
import Dodge.Particle.Bullet.Spawn
|
||||
import Dodge.Bullet
|
||||
import Color
|
||||
import Geometry
|
||||
import LensHelp
|
||||
@@ -44,8 +44,8 @@ applyDamageEffect dm de cr w = case de of
|
||||
& creatures . ix (_crID cr) . crDir +~ rot
|
||||
BounceBullet bt | crIsArmouredFrom p cr -> w & instantBullets .:~ bouncer
|
||||
where
|
||||
bouncer = (aBulAt Nothing id pOut reflectVel (_buDrag bt)
|
||||
(_buHitEff bt) (_buWidth bt)
|
||||
bouncer = (aBulAt Nothing pOut reflectVel (_buDrag bt) (_buHitEff bt) (_buWidth bt)
|
||||
BasicBulletTrajectory
|
||||
) {_buTimer = _buTimer bt - 1}
|
||||
pOut = p +.+ 2 *.* newDir
|
||||
reflectVel = magV bulVel *.* newDir
|
||||
|
||||
Reference in New Issue
Block a user