Start to add basic gibbing

This commit is contained in:
2022-06-03 18:00:07 +01:00
parent b50e53f400
commit dd985c6a49
7 changed files with 60 additions and 11 deletions
+10 -9
View File
@@ -14,6 +14,7 @@ import Dodge.Placement.PlaceSpot.TriggerDoor
--import Dodge.LevelGen.Data
import Dodge.Default.Wall
import Dodge.ShiftPoint
import Dodge.Base.NewID
--import Dodge.RandomHelp
--import Dodge.Placements.Spot
import Geometry
@@ -152,15 +153,15 @@ plNewID l x w = (i,w & l #%~ IM.insert i x)
where
i = IM.newKey $ w ^# l
-- | place an new object into an intmap and update its id
plNewUpID :: ALens' World (IM.IntMap a)
-> ALens' a Int
-> a
-> World
-> (Int,World)
plNewUpID l li x w = (i,w & l #%~ IM.insert i (x & li #~ i))
where
i = IM.newKey $ w ^# l
---- | place an new object into an intmap and update its id
--plNewUpID :: ALens' World (IM.IntMap a)
-- -> ALens' a Int
-- -> a
-- -> World
-- -> (Int,World)
--plNewUpID l li x w = (i,w & l #%~ IM.insert i (x & li #~ i))
-- where
-- i = IM.newKey $ w ^# l
mvProp :: Point2 -> Float -> Prop -> Prop
mvProp p a = (pjRot +~ a) . (pjPos %~ ( (p +.+) . rotateV a ))