Implement targeting launcher shells using separate item

This commit is contained in:
2024-09-29 16:24:26 +01:00
parent 7d72fa3c5d
commit 88c3e02459
36 changed files with 747 additions and 610 deletions
+12 -12
View File
@@ -1,16 +1,16 @@
module Dodge.Item.Weapon.Targeting (
useTargetPos,
-- useTargetPos,
) where
import Control.Lens
import Dodge.Data.World
import Geometry.Data
--import Control.Lens
--import Dodge.Data.World
--import Geometry.Data
useTargetPos ::
(Maybe Point2 -> Creature -> World -> World) ->
Creature ->
World ->
World
useTargetPos f cr w = case cr ^? crTargeting . ctPos of
Nothing -> w
Just p -> f p cr w
--useTargetPos ::
-- (Maybe Point2 -> Creature -> World -> World) ->
-- Creature ->
-- World ->
-- World
--useTargetPos f cr w = case cr ^? crTargeting . ctPos of
-- Nothing -> w
-- Just p -> f p cr w