This commit is contained in:
2022-07-24 13:53:35 +01:00
parent ac069d08f6
commit 2c1bc67a51
16 changed files with 185 additions and 199 deletions
+16 -16
View File
@@ -218,8 +218,8 @@ data World = World
, _projectiles :: IM.IntMap Proj
, _instantBullets :: [Bullet]
, _bullets :: [Bullet]
, _instantParticles :: [Particle]
, _particles :: [Particle]
-- , _instantParticles :: [Particle]
-- , _particles :: [Particle]
, _radarSweeps :: [RadarSweep]
, _energyBalls :: [EnergyBall]
, _posEvents :: [PosEvent]
@@ -292,7 +292,7 @@ data World = World
, _lSelect :: Point2
, _rSelect :: Point2
}
--deriving (Eq,Ord,Show,Read)
-- deriving (Eq,Ord,Show,Read)
data WorldHammer
= SubInvHam
| DoubleMouseHam
@@ -385,18 +385,18 @@ data WorldBeams = WorldBeams
{- Objects without ids.
Update themselves, perhaps with side effects. -}
data Particle
= ShockLine
{ _ptUpdate :: World -> Particle -> (World, Maybe Particle)
, _ptPointDirs :: [[(Point2,Float)]]
, _ptTimer :: Int
, _ptColor :: Color
, _ptCenter :: Point2
}
type HitEffect = Particle
-> Stream (Of (Point2, Either Creature Wall)) Identity ()
-> World
-> (World,Maybe Particle)
--data Particle = DPart
-- = ShockLine
-- { _ptUpdate :: World -> Particle -> (World, Maybe Particle)
-- , _ptPointDirs :: [[(Point2,Float)]]
-- , _ptTimer :: Int
-- , _ptColor :: Color
-- , _ptCenter :: Point2
-- }
--type HitEffect = Particle
-- -> Stream (Of (Point2, Either Creature Wall)) Identity ()
-- -> World
-- -> (World,Maybe Particle)
type HitEffect' = Flame
-> Stream (Of (Point2, Either Creature Wall)) Identity ()
-> World
@@ -593,7 +593,7 @@ data InPlacement = InPlacement
}
makeLenses ''World
makeLenses ''FloorItem
makeLenses ''Particle
--makeLenses ''Particle
makeLenses ''Door
makeLenses ''Terminal
makeLenses ''Machine