Refactor bullet hit effect towards penetrating bullets
This commit is contained in:
+8
-5
@@ -447,7 +447,7 @@ data Particle' =
|
||||
, _btPassThrough' :: Maybe Int
|
||||
, _btWidth' :: Float
|
||||
, _btTimer' :: Int
|
||||
, _btHitEffect' :: HitEffect'
|
||||
, _btHitEffect' :: HitEffect
|
||||
}
|
||||
| Pt' { _ptPict' :: Drawing
|
||||
, _ptUpdate' :: World -> Particle' -> (World, Maybe Particle')
|
||||
@@ -457,7 +457,7 @@ data Particle' =
|
||||
, _btPassThrough' :: Maybe Int
|
||||
, _btWidth' :: Float
|
||||
, _btTimer' :: Int
|
||||
, _btHitEffect' :: HitEffect'
|
||||
, _btHitEffect' :: HitEffect
|
||||
}
|
||||
| Shockwave'
|
||||
{ _ptPict' :: Drawing
|
||||
@@ -471,10 +471,14 @@ data Particle' =
|
||||
, _btTimer' :: Int
|
||||
}
|
||||
|
||||
type HitEffect = Particle' -> [( Point2, [(Point2, (Either3 Creature Wall ForceField))] )]
|
||||
-> World -> World
|
||||
type HitEffect' = Particle' -> (Point2, (Either3 Creature Wall ForceField)) -> World -> World
|
||||
|
||||
type HitEffect'' = Particle' -> [(Point2, (Either3 Creature Wall ForceField))] -> World -> World
|
||||
|
||||
type HitEffect = Particle' -> [(Point2, (Either3 Creature Wall ForceField))] -> World
|
||||
-> (World,Maybe Particle')
|
||||
|
||||
|
||||
data Particle =
|
||||
Particle { _ptPos :: Point2
|
||||
, _ptStartPos :: Point2
|
||||
@@ -492,7 +496,6 @@ data Particle =
|
||||
, _btPassThrough :: Maybe Int
|
||||
, _btColor :: Color
|
||||
, _btWidth :: Float
|
||||
-- , _btHitEffect :: Particle -> [(Point2, Either3 Creature Wall ForceField)] -> World -> World
|
||||
}
|
||||
| Bullet'
|
||||
{ _ptPos :: Point2
|
||||
|
||||
Reference in New Issue
Block a user