Move bullet trajectory into bullet update function
This commit is contained in:
+11
-4
@@ -524,8 +524,15 @@ data BeamType
|
||||
{_beamCombine :: (Point2 , (Point2,Point2,Beam) , (Point2,Point2,Beam)) -> World -> World}
|
||||
| BeamSimple
|
||||
|
||||
data BulletState = NormalBulletState
|
||||
| DyingBulletState
|
||||
| DelayedBullet Float
|
||||
data BulletUpdateMod = NoBulletUpdateMod
|
||||
|
||||
data Bullet = Bullet
|
||||
{ _buUpdate :: World -> Bullet -> (World, Maybe Bullet)
|
||||
{ _buState :: BulletState
|
||||
, _buUpdateMod :: BulletUpdateMod
|
||||
, _buTrajectory :: BulletTrajectory
|
||||
, _buVel :: Point2
|
||||
, _buDrag :: Float
|
||||
, _buPos :: Point2
|
||||
@@ -645,9 +652,9 @@ type HitEffect' = Bullet
|
||||
|
||||
data BulletTrajectory
|
||||
= BasicBulletTrajectory
|
||||
| BezierTrajectory
|
||||
| FlechetteTrajectory
|
||||
| MagnetTrajectory
|
||||
| BezierTrajectory Point2 Point2 Point2
|
||||
| FlechetteTrajectory Point2
|
||||
| MagnetTrajectory Point2
|
||||
|
||||
data AmmoType
|
||||
= ProjectileAmmo
|
||||
|
||||
Reference in New Issue
Block a user