Make creatures rotate when falling down chasms
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
{-# OPTIONS_GHC -Wno-orphans #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
@@ -11,6 +12,7 @@ import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Dodge.Data.AimStance
|
||||
import Geometry.Data
|
||||
import Linear
|
||||
|
||||
data Stance = Stance
|
||||
{ _carriage :: Carriage
|
||||
@@ -23,7 +25,7 @@ data Carriage
|
||||
| Floating
|
||||
| Flying {_zSpeed :: Float, _flyInertia :: Float}
|
||||
| Boosting Point2
|
||||
| Falling
|
||||
| Falling {_fallRot :: Quaternion Float, _fallDir :: Quaternion Float}
|
||||
| OnGround
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
@@ -36,6 +38,7 @@ data Posture = Aiming | AtEase
|
||||
makeLenses ''Stance
|
||||
makeLenses ''Carriage
|
||||
makeLenses ''Posture
|
||||
deriveJSON defaultOptions ''Quaternion
|
||||
deriveJSON defaultOptions ''FootForward
|
||||
deriveJSON defaultOptions ''Posture
|
||||
deriveJSON defaultOptions ''Carriage
|
||||
|
||||
Reference in New Issue
Block a user