Continue placement refactor
This commit is contained in:
@@ -49,16 +49,12 @@ data PlacementSpot = PS
|
||||
, _psRot :: Float
|
||||
, _psType :: PSType
|
||||
}
|
||||
data Placement
|
||||
= SimplePlacement {_placementSpot :: PlacementSpot }
|
||||
| IDPlacement {_placementSpot :: PlacementSpot, _idPlacement :: Int -> Placement }
|
||||
-- | GroupedPlacement
|
||||
-- {_groupPlacementID :: Int
|
||||
-- ,_groupUpdate :: World -> [Placement] -> World
|
||||
-- ,_placementSpot :: PlacementSpot
|
||||
-- }
|
||||
data Placement = Placement
|
||||
{ _placementSpot :: PlacementSpot
|
||||
, _idPlacement :: Int -> Maybe Placement
|
||||
}
|
||||
sPS :: Point2 -> Float -> PSType -> Placement
|
||||
sPS p a = SimplePlacement . PS p a
|
||||
sPS p a pt = Placement (PS p a pt) (const Nothing)
|
||||
makeLenses ''PSType
|
||||
makeLenses ''PlacementSpot
|
||||
makeLenses ''Placement
|
||||
|
||||
@@ -2,17 +2,17 @@ module Dodge.LevelGen.SwarmPlacement
|
||||
( --swarmPS
|
||||
)
|
||||
where
|
||||
import Dodge.Data
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.Creature.State.Data
|
||||
--import Geometry
|
||||
import Geometry.ConvexPoly
|
||||
import Geometry.Data
|
||||
import qualified IntMapHelp as IM
|
||||
|
||||
import Data.List
|
||||
import qualified Data.IntSet as IS
|
||||
import Control.Lens
|
||||
--import Dodge.Data
|
||||
--import Dodge.LevelGen.Data
|
||||
--import Dodge.Creature.State.Data
|
||||
----import Geometry
|
||||
--import Geometry.ConvexPoly
|
||||
--import Geometry.Data
|
||||
--import qualified IntMapHelp as IM
|
||||
--
|
||||
--import Data.List
|
||||
--import qualified Data.IntSet as IS
|
||||
--import Control.Lens
|
||||
|
||||
--swarmPS :: Int -> Point2 -> Float -> Creature -> Placement
|
||||
--swarmPS i p a cr = GroupedPlacement
|
||||
|
||||
Reference in New Issue
Block a user