Working implementation of light change when door opens
This commit is contained in:
@@ -135,8 +135,9 @@ addBlock (p:ps) hp col isSeeThrough degradability w
|
||||
ips = map zoneOfPoint $ uncurry (divideLine (2*zoneSize)) (_wlLine wl)
|
||||
addBlock _ _ _ _ _ _ = error "Trying to add a block with incomplete polygon"
|
||||
|
||||
putBlock :: [Point2] -> Int -> Color -> Bool -> [Int] -> World -> World
|
||||
putBlock (p:ps) i c b is w = foldr (uncurry removePathsCrossing) wWithBlock pairs
|
||||
-- TODO add block list to world
|
||||
putBlock :: [Point2] -> Int -> Color -> Bool -> [Int] -> World -> (Int,World)
|
||||
putBlock (p:ps) i c b is w = (0, foldr (uncurry removePathsCrossing) wWithBlock pairs)
|
||||
where
|
||||
pairs = zip (p:ps) (ps ++ [p])
|
||||
wWithBlock = addBlock (p:ps) i c b is w
|
||||
|
||||
Reference in New Issue
Block a user