Improve chaseCrit shape
This commit is contained in:
@@ -117,19 +117,14 @@ wasdWithAiming w cr = wasdAim inp w $ wasdMovement (w ^. cWorld . lWorld) inp ca
|
||||
wasdAim :: Input -> World -> Creature -> Creature
|
||||
wasdAim inp w cr
|
||||
| SDL.ButtonRight `M.member` _mouseButtons inp
|
||||
, AtEase <- cr ^. crStance . posture = setposture Aiming (-twoHandTwistAmount)
|
||||
-- cr
|
||||
-- & crStance . posture .~ Aiming
|
||||
-- & doAimTwist (cr ^? crManipulation . manObject . imAimStance) (-twoHandTwistAmount)
|
||||
| SDL.ButtonRight `M.member` _mouseButtons inp =
|
||||
aimTurn (w ^. cWorld . lWorld) mousedir cr
|
||||
, AtEase <- cr ^. crStance . posture =
|
||||
setposture Aiming (-twoHandTwistAmount)
|
||||
| SDL.ButtonRight `M.member` _mouseButtons inp = aimTurn (w ^. cWorld . lWorld) mousedir cr
|
||||
| Aiming{} <- cr ^. crStance . posture = setposture AtEase twoHandTwistAmount
|
||||
-- cr
|
||||
-- & crStance . posture .~ AtEase
|
||||
-- & doAimTwist (cr ^? crManipulation . manObject . imAimStance) twoHandTwistAmount
|
||||
| otherwise = creatureTurnTowardDir (_crMvAim cr) 0.2 cr
|
||||
where
|
||||
setposture x r = cr
|
||||
setposture x r =
|
||||
cr
|
||||
& crStance . posture .~ x
|
||||
& doAimTwist (cr ^? crManipulation . manObject . imAimStance) r
|
||||
mousedir = argV $ w ^. cWorld . lWorld . lAimPos - (cr ^. crPos . _xy)
|
||||
|
||||
Reference in New Issue
Block a user