Refactor creature draw, pass World to function

This commit is contained in:
2021-05-25 21:44:25 +02:00
parent 28386ec8b9
commit d4a15a2416
10 changed files with 48 additions and 37 deletions
+3 -1
View File
@@ -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