This commit is contained in:
2022-07-27 12:49:23 +01:00
parent 6554d219dc
commit 8d17ce66e9
106 changed files with 2911 additions and 2678 deletions
+40
View File
@@ -0,0 +1,40 @@
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Item.Targeting where
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Geometry.Data
data Targeting
= NoTargeting
| Targeting
{ _tgPos :: Maybe Point2
, _tgUpdate :: TargetUpdate --Item -> Creature -> World -> Targeting -> (World, Targeting)
, _tgDraw :: TargetDraw --Item -> Creature -> Configuration -> World -> Picture
, _tgID :: Maybe Int
, _tgActive :: Bool
}
deriving (Eq, Ord, Show, Read)
data TargetUpdate
= NoTargetUpdate
| TargetLaserUpdate
| TargetRBPressUpdate
| TargetRBCreatureUpdate
| TargetCursorUpdate
deriving (Eq, Ord, Show, Read)
data TargetDraw
= NoTargetDraw
| TargetDistanceDraw
| SimpleDrawTarget
| TargetRBCreatureDraw
deriving (Eq, Ord, Show, Read)
makeLenses ''Targeting
deriveJSON defaultOptions ''Targeting
deriveJSON defaultOptions ''TargetUpdate
deriveJSON defaultOptions ''TargetDraw