Start moving creature properties out of records

This commit is contained in:
2025-06-06 08:46:27 +01:00
parent bae75a1e60
commit 4ae7c6ebd6
32 changed files with 609 additions and 672 deletions
+13 -11
View File
@@ -1,12 +1,12 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Bullet
( module Dodge.Data.Bullet
, module Dodge.Data.Damage
)where
module Dodge.Data.Bullet (
module Dodge.Data.Bullet,
module Dodge.Data.Damage,
) where
import Control.Lens
import Data.Aeson
@@ -17,18 +17,20 @@ import Geometry.Data
data Bullet = Bullet
{ _buEffect :: BulletEffect
, _buPayload :: BulletPayload
-- , _buTrajectory :: BulletTrajectory
, _buVel :: Point2
, -- , _buTrajectory :: BulletTrajectory
_buVel :: Point2
, _buDrag :: Float
, _buPos :: Point2
, _buOldPos :: Point2
, _buWidth :: Float
-- , _buTimer :: Int
, _buDamages :: [Damage]
}
deriving (Show, Eq, Ord, Read) --Generic, Flat)
data EnergyBallType = IncBall | TeslaBall | ConcBall
data EnergyBallType
= IncBall
| TeslaBall
| ConcBall
| FlashBall
deriving (Show, Eq, Ord, Enum, Bounded, Read) --Generic, Flat)
@@ -38,8 +40,8 @@ data BulletEffect
| PenetrateBullet
deriving (Eq, Ord, Show, Enum, Bounded, Read) --Generic, Flat)
data BulletPayload
= BulBall {_spawnEBT :: EnergyBallType}
data BulletPayload
= BulBall {_spawnEBT :: EnergyBallType}
| BulSpark
| BulFlak
| BulFrag