Refactor grenades and rockets to allow different explosions
This commit is contained in:
@@ -484,6 +484,14 @@ data Projectile = Projectile { _ptPos :: Point2
|
||||
, _ptID :: Int
|
||||
, _ptUpdate :: World -> World
|
||||
}
|
||||
| Shell { _ptPos :: Point2
|
||||
, _ptStartPos :: Point2
|
||||
, _ptVel :: Point2
|
||||
, _ptPict :: Picture
|
||||
, _ptID :: Int
|
||||
, _ptUpdate :: World -> World
|
||||
, _ptExplosion :: Point2-> World -> World
|
||||
}
|
||||
|
||||
data DamageType = Piercing {_dmAmount :: Int , _dmFrom :: Point2 , _dmAt :: Point2 , _dmTo :: Point2 }
|
||||
| Blunt {_dmAmount :: Int , _dmFrom :: Point2 , _dmAt :: Point2 , _dmTo :: Point2 }
|
||||
|
||||
Reference in New Issue
Block a user