Add PlasmaBalls

This commit is contained in:
2026-03-17 10:45:58 +00:00
parent 0ca3bf33c9
commit 902d8e0c00
9 changed files with 245 additions and 172 deletions
+3
View File
@@ -40,8 +40,10 @@ module Dodge.Data.LWorld (
module Dodge.Data.Wall,
module Dodge.Data.WorldEffect,
module Dodge.Data.PulseLaser,
module Dodge.Data.PlasmaBall,
) where
import Dodge.Data.PlasmaBall
import ShapePicture.Data
import Dodge.Data.PulseLaser
import Dodge.Data.Equipment.Misc
@@ -101,6 +103,7 @@ data LWorld = LWorld
, _debris :: [Debris]
, _projectiles :: IM.IntMap Projectile
, _bullets :: [Bullet]
, _plasmaBalls :: [PlasmaBall]
, _radarSweeps :: [RadarSweep]
, _energyBalls :: [EnergyBall]
, _flames :: [Flame]
+25
View File
@@ -0,0 +1,25 @@
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.PlasmaBall (
module Dodge.Data.PlasmaBall
) where
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Geometry.Data
data PlasmaBall = PBall
{ _pbType :: PlasmaBallType
, _pbVel :: Point2
, _pbPos :: Point2
}
deriving (Show, Eq, Ord, Read) --Generic, Flat)
data PlasmaBallType = DefaultPlasma
deriving (Show, Eq, Ord, Read) --Generic, Flat)
makeLenses ''PlasmaBall
deriveJSON defaultOptions ''PlasmaBallType
deriveJSON defaultOptions ''PlasmaBall
+4 -4
View File
@@ -18,10 +18,10 @@ data PulseLaser = PulseLaser
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data PulseBall = PulseBall
{ _pbVel :: Point2
, _pbPos :: Point2
, _pbTimer :: Int
, _pbID :: Int
{ _pzbVel :: Point2
, _pzbPos :: Point2
, _pzbTimer :: Int
, _pzbID :: Int
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)