Refactor shell movement, modularised in a tweakable way

This commit is contained in:
2021-05-26 03:35:30 +02:00
parent 7ca7a2f941
commit f05381be47
9 changed files with 170 additions and 112 deletions
+4
View File
@@ -390,6 +390,8 @@ data Ammo
= ShellAmmo
{ _amPayload :: Point2 -> World -> World
, _amString :: String
, _amPjMove :: Item -> Creature -> [Projectile -> World -> World]
, _amPjDraw :: Projectile -> Picture
}
| BulletAmmo
{ _amString :: String
@@ -408,12 +410,14 @@ data Projectile
{ _pjPos :: Point2
, _pjStartPos :: Point2
, _pjVel :: Point2
, _pjAcc :: Point2
, _pjDir :: Float
, _pjSpin :: Float
, _pjDraw :: Projectile -> Picture
, _pjID :: Int
, _pjUpdate :: Projectile -> World -> World
, _pjPayload :: Point2 -> World -> World
, _pjTimer :: Int
}
| LinearShockwave
{ _pjDraw :: Projectile -> Picture