44 lines
1.0 KiB
Haskell
44 lines
1.0 KiB
Haskell
{-# LANGUAGE StrictData #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
|
|
module Dodge.Data.Creature.Stance (
|
|
module Dodge.Data.Creature.Stance,
|
|
module Dodge.Data.AimStance,
|
|
) where
|
|
|
|
import Control.Lens
|
|
import Data.Aeson
|
|
import Data.Aeson.TH
|
|
import Dodge.Data.AimStance
|
|
import Geometry.Data
|
|
|
|
data Stance = Stance
|
|
{ _carriage :: Carriage
|
|
, _posture :: Posture
|
|
, _strideLength :: Float
|
|
}
|
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
|
|
data Carriage
|
|
= Walking {_strideAmount :: Float, _currentFoot :: FootForward}
|
|
| Floating
|
|
| Flying
|
|
| Boosting Point2
|
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
|
|
data FootForward = LeftForward | RightForward
|
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
|
|
data Posture
|
|
= Aiming {_aimStance :: AimStance}
|
|
| AtEase
|
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
|
|
makeLenses ''Stance
|
|
makeLenses ''Carriage
|
|
makeLenses ''Posture
|
|
deriveJSON defaultOptions ''FootForward
|
|
deriveJSON defaultOptions ''Posture
|
|
deriveJSON defaultOptions ''Carriage
|
|
deriveJSON defaultOptions ''Stance
|