Separate and reify laser beams
This commit is contained in:
+5
-9
@@ -77,7 +77,9 @@ module Dodge.Data
|
||||
, module Dodge.Data.Projectile
|
||||
, module Dodge.Data.Modification
|
||||
, module Dodge.Data.PressPlate
|
||||
, module Dodge.Data.Laser
|
||||
) where
|
||||
import Dodge.Data.Laser
|
||||
import Dodge.Data.PressPlate
|
||||
import Dodge.Data.Modification
|
||||
import Dodge.Data.Projectile
|
||||
@@ -220,6 +222,8 @@ data World = World
|
||||
, _flares :: [Flare]
|
||||
, _newBeams :: WorldBeams
|
||||
, _beams :: WorldBeams
|
||||
, _lasers :: [LaserStart]
|
||||
, _lasersToDraw :: [Laser]
|
||||
, _walls :: IM.IntMap Wall
|
||||
, _wallDamages :: IM.IntMap [Damage]
|
||||
, _doors :: IM.IntMap Door
|
||||
@@ -370,15 +374,7 @@ data WorldBeams = WorldBeams
|
||||
{- Objects without ids.
|
||||
Update themselves, perhaps with side effects. -}
|
||||
data Particle
|
||||
= LaserParticle
|
||||
{ _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
, _ptRange :: Float
|
||||
, _ptDamage :: Int
|
||||
, _ptColor :: Color
|
||||
, _ptPhaseV :: Float
|
||||
, _ptPoints :: [Point2]
|
||||
}
|
||||
| PtTeslaArc
|
||||
= PtTeslaArc
|
||||
{ _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
, _ptPoints :: [Point2]
|
||||
, _ptTimer :: Int
|
||||
|
||||
Reference in New Issue
Block a user