Add ItEffect data as parameter to the effect itself
This commit is contained in:
+12
-4
@@ -285,11 +285,12 @@ data Item
|
||||
| NoItem
|
||||
data ItEffect = NoItEffect
|
||||
| ItInvEffect
|
||||
{_itInvEffect :: Creature -> Int -> World -> World
|
||||
{_itInvEffect :: ItEffect -> Creature -> Int -> World -> World
|
||||
-- the Int is the items inventory position
|
||||
,_itEffectCounter :: Int
|
||||
}
|
||||
| ItEffect
|
||||
{_itInvEffect :: Creature -> Int -> World -> World
|
||||
{_itInvEffect :: ItEffect -> Creature -> Int -> World -> World
|
||||
,_itFloorEffect :: Int -> World -> World
|
||||
,_itEffectCounter :: Int
|
||||
}
|
||||
@@ -386,7 +387,7 @@ data Projectile
|
||||
, _pjVel :: Point2
|
||||
, _pjDraw :: Projectile -> Picture
|
||||
, _pjID :: Int
|
||||
, _pjUpdate :: World -> World
|
||||
, _pjUpdate :: Projectile -> World -> World
|
||||
}
|
||||
| Shell
|
||||
{ _pjPos :: Point2
|
||||
@@ -394,9 +395,16 @@ data Projectile
|
||||
, _pjVel :: Point2
|
||||
, _pjDraw :: Projectile -> Picture
|
||||
, _pjID :: Int
|
||||
, _pjUpdate :: World -> World
|
||||
, _pjUpdate :: Projectile -> World -> World
|
||||
, _pjPayload :: Point2-> World -> World
|
||||
}
|
||||
| LinearShockwave
|
||||
{ _pjDraw :: Projectile -> Picture
|
||||
, _pjID :: Int
|
||||
, _pjUpdate :: Projectile -> World -> World
|
||||
, _pjPoints :: [(Point2,Point2)]
|
||||
, _pjTimer :: Int
|
||||
}
|
||||
data Either3 a b c = E3x1 a | E3x2 b | E3x3 c
|
||||
data Wall
|
||||
= Wall
|
||||
|
||||
Reference in New Issue
Block a user