Create datatypes for radar sweeps
This commit is contained in:
+4
-8
@@ -10,6 +10,7 @@ circular imports are probably not a good idea.
|
||||
{-# LANGUAGE DerivingStrategies #-}
|
||||
module Dodge.Data
|
||||
( module Dodge.Data
|
||||
, module Dodge.Data.RadarSweep
|
||||
, module Dodge.Data.PosEvent
|
||||
, module Dodge.Data.EnergyBall
|
||||
, module Dodge.Data.Flame
|
||||
@@ -52,6 +53,7 @@ module Dodge.Data
|
||||
, module Dodge.Data.RadarBlip
|
||||
, module Dodge.Data.PathGraph
|
||||
) where
|
||||
import Dodge.Data.RadarSweep
|
||||
import Dodge.Data.PosEvent
|
||||
import Dodge.Data.EnergyBall
|
||||
import Dodge.Data.Flame
|
||||
@@ -157,6 +159,7 @@ data World = World
|
||||
, _bullets :: [Bullet]
|
||||
, _instantParticles :: [Particle]
|
||||
, _particles :: [Particle]
|
||||
, _radarSweeps :: [RadarSweep]
|
||||
, _energyBalls :: [EnergyBall]
|
||||
, _posEvents :: [PosEvent]
|
||||
, _flames :: [Flame]
|
||||
@@ -536,14 +539,7 @@ data BeamType
|
||||
{- Objects without ids.
|
||||
Update themselves, perhaps with side effects. -}
|
||||
data Particle
|
||||
= RadarCircleParticle
|
||||
{ _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
, _ptTimer :: Int
|
||||
, _ptRad :: Float
|
||||
, _ptPos :: Point2
|
||||
, _ptColor :: Color
|
||||
}
|
||||
| LaserParticle
|
||||
= LaserParticle
|
||||
{ _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
, _ptRange :: Float
|
||||
, _ptDamage :: Int
|
||||
|
||||
Reference in New Issue
Block a user