Tweak inventory management
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
module Dodge.Inventory.CloseObject where
|
||||
import Dodge.Data
|
||||
import Geometry
|
||||
|
||||
|
||||
closeObjPos :: Either FloorItem Button -> Point2
|
||||
closeObjPos e = case e of
|
||||
Right x -> _btPos x
|
||||
Left x -> _flItPos x
|
||||
|
||||
closeObjEq :: Either FloorItem Button -> Either FloorItem Button -> Bool
|
||||
closeObjEq (Right x) (Right y) = _btID x == _btID y
|
||||
closeObjEq (Left x) (Left y) = _flItID x == _flItID y
|
||||
closeObjEq _ _ = False
|
||||
Reference in New Issue
Block a user