Add variable door speed, still buggy
This commit is contained in:
@@ -42,10 +42,11 @@ twinSlowDoorRoom drID w h x = defaultRoom
|
||||
[ sPS (V2 0 (h/2)) 0 putLamp
|
||||
, sPS (V2 25 5) 0 putLamp
|
||||
, sPS (V2 (negate 25) 5) 0 putLamp
|
||||
, sPS (V2 0 0) 0 $ PutSingleDoor col cond (V2 x 1) (V2 x h)
|
||||
, sPS (V2 0 0) 0 $ PutSingleDoor col cond (V2 (-x) 1) (V2 (-x) h)
|
||||
, sPS (V2 0 (h-5)) pi $ PutButton $ makeButton col
|
||||
, sPS (V2 0 0) 0 $ PutSingleDoor col cond (V2 x 1) (V2 x h) 1
|
||||
, sPS (V2 0 0) 0 $ PutSingleDoor col cond (V2 (-x) 1) (V2 (-x) h) 1
|
||||
, sPS (V2 0 (h-5)) pi $ PutButton $ makeSwitch col
|
||||
(over worldState (M.insert (DoorNumOpen drID) True))
|
||||
(over worldState (M.insert (DoorNumOpen drID) False))
|
||||
]
|
||||
, _rmBound = ps
|
||||
, _rmName = "twinSlowDoorRoom"
|
||||
@@ -98,7 +99,7 @@ slowDoorRoom = do
|
||||
pillars <- takeOne [pillarsa, pillarsb, pillarsc]
|
||||
let cond x' = (sndV2 . fst) x' > h + 40
|
||||
cond2 x' = (sndV2 . fst) x' < h - 40
|
||||
but <- takeOne [PutBtDoor (dim $ light red) butPos butRot (V2 0 h) (V2 x h)
|
||||
but <- takeOne [PutBtDoor (dim $ light red) butPos butRot (V2 0 h) (V2 x h) 2
|
||||
-- ,PutSwitchDoor (dim $ light red) butPos butRot (0,h) (x,h)
|
||||
]
|
||||
fmap connectRoom
|
||||
|
||||
Reference in New Issue
Block a user