Implement targeting launcher shells using separate item
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user