Refactor shell movement, modularised in a tweakable way
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user