Reify tesla arcs

This commit is contained in:
2022-07-23 23:46:03 +01:00
parent 7563441154
commit 97174535d8
7 changed files with 40 additions and 30 deletions
+4 -7
View File
@@ -78,7 +78,9 @@ module Dodge.Data
, module Dodge.Data.Modification
, module Dodge.Data.PressPlate
, module Dodge.Data.Laser
, module Dodge.Data.TeslaArc
) where
import Dodge.Data.TeslaArc
import Dodge.Data.Laser
import Dodge.Data.PressPlate
import Dodge.Data.Modification
@@ -222,6 +224,7 @@ data World = World
, _flares :: [Flare]
, _newBeams :: WorldBeams
, _beams :: WorldBeams
, _teslaArcs :: [TeslaArc]
, _lasers :: [LaserStart]
, _lasersToDraw :: [Laser]
, _walls :: IM.IntMap Wall
@@ -374,13 +377,7 @@ data WorldBeams = WorldBeams
{- Objects without ids.
Update themselves, perhaps with side effects. -}
data Particle
= PtTeslaArc
{ _ptUpdate :: World -> Particle -> (World, Maybe Particle)
, _ptPoints :: [Point2]
, _ptTimer :: Int
, _ptColor :: Color
}
| PtTargetLaser
= PtTargetLaser
{ _ptUpdate :: World -> Particle -> (World, Maybe Particle)
, _ptPoints :: [Point2]
, _ptColor :: Color