Implement floating camera
This commit is contained in:
@@ -104,7 +104,7 @@ wasdDir :: World -> Point2
|
||||
wasdDir = foldl' (flip $ (+.+) . wasdM) (V2 0 0) . M.keys . _pressedKeys . _input
|
||||
|
||||
-- | Set posture according to mouse presses.
|
||||
mouseActionsCr :: M.Map SDL.MouseButton Bool -> Creature -> Creature
|
||||
mouseActionsCr :: M.Map SDL.MouseButton Int -> Creature -> Creature
|
||||
mouseActionsCr pkeys cr
|
||||
| rbPressed && noaction =
|
||||
cr & crStance . posture .~ Aiming
|
||||
@@ -115,7 +115,7 @@ mouseActionsCr pkeys cr
|
||||
theaction <- cr ^? crManipulation . manObject . inInventory . iselAction
|
||||
return $ theaction == NoInvSelAction
|
||||
|
||||
pressedMBEffectsTopInventory :: M.Map SDL.MouseButton Bool -> World -> World
|
||||
pressedMBEffectsTopInventory :: M.Map SDL.MouseButton Int -> World -> World
|
||||
pressedMBEffectsTopInventory pkeys w
|
||||
| isDown SDL.ButtonLeft && isDown SDL.ButtonRight && inTopInv = useItem (you w) w
|
||||
| isDown SDL.ButtonLeft && inTopInv = doTopInvLeftClick (you w) w
|
||||
|
||||
Reference in New Issue
Block a user