Make tanks into decorated blocks
This commit is contained in:
@@ -8,16 +8,20 @@ import Shape
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.Default.Block
|
||||
|
||||
lowBlock :: Material -> Color -> Float -> [Point2] -> PSType
|
||||
lowBlock mat col h ps = PutBlock bl wl $ reverse ps
|
||||
decoratedBlock :: (Block -> Shape) -> Material -> Color -> Float -> [Point2] -> PSType
|
||||
decoratedBlock decf mat col h ps = PutBlock bl wl $ reverse ps
|
||||
where
|
||||
bl = defaultBlock
|
||||
& blDraw .~ const (noPic $ colorSH col (upperPrismPoly h $ reverse ps))
|
||||
& blDraw .~ (\bl' -> noPic (colorSH col (upperPrismPoly h $ reverse ps) <> decf bl'))
|
||||
& blDeath .~ const id
|
||||
& blHeight .~ h
|
||||
& blMaterial .~ mat
|
||||
wl = defaultWall
|
||||
& wlUnshadowed .~ False
|
||||
& wlColor .~ col
|
||||
& wlRotateTo .~ False
|
||||
& wlOpacity .~ SeeAbove
|
||||
& wlMaterial .~ mat
|
||||
& wlHeight .~ h
|
||||
|
||||
lowBlock :: Material -> Color -> Float -> [Point2] -> PSType
|
||||
lowBlock = decoratedBlock (const mempty)
|
||||
|
||||
Reference in New Issue
Block a user