Move bullet bouncing into separate datatype field

This commit is contained in:
2022-07-17 20:23:50 +01:00
parent b860de70a7
commit 6c6fe43bc0
9 changed files with 98 additions and 67 deletions
-10
View File
@@ -73,13 +73,3 @@ hvBulDams bt p =
sp = _buPos bt
bulVel = _buVel bt
ep = sp +.+ bulVel
bounceBulDams :: Bullet -> Point2 -> [Damage]
bounceBulDams bt p =
[ Damage PIERCING 80 sp p ep (BounceBullet bt)
, Damage PUSHDAM 1 sp p ep . PushBackDamage $ 2 *.* bulVel
]
where
sp = _buPos bt
bulVel = _buVel bt
ep = sp +.+ bulVel