Refactor creature draw, pass World to function
This commit is contained in:
+3
-1
@@ -136,7 +136,7 @@ data Creature = Creature
|
||||
, _crVel :: Point2
|
||||
, _crDir :: Float
|
||||
, _crID :: Int
|
||||
, _crPict :: Creature -> Picture
|
||||
, _crPict :: Creature -> World -> Picture
|
||||
, _crUpdate
|
||||
:: World
|
||||
-> (World -> World,StdGen)
|
||||
@@ -219,6 +219,8 @@ data Item
|
||||
, _itEffect :: ItEffect
|
||||
, _itInvDisplay :: Item -> String
|
||||
, _itInvColor :: Color
|
||||
, _itTargeting :: Maybe (World -> Maybe Point2, Item -> Int -> Creature -> World -> Picture)
|
||||
, _itWorldTrigger :: Maybe (Int -> World -> Bool)
|
||||
}
|
||||
| Consumable
|
||||
{ _itName :: String
|
||||
|
||||
Reference in New Issue
Block a user