Add variable door speed, still buggy
This commit is contained in:
@@ -24,9 +24,12 @@ mvPs :: (Point2,Point2) -> (Point2,Point2) -> (Point2,Point2)
|
||||
{-# INLINE mvPs #-}
|
||||
mvPs (!ex,!ey) (!sx,!sy) = (mvP ex sx,mvP ey sy)
|
||||
|
||||
moveDoorToward :: (Point2,Point2) -> Wall -> Wall
|
||||
moveDoorToward :: Float -> (Point2,Point2) -> Wall -> Wall
|
||||
{-# INLINE moveDoorToward #-}
|
||||
moveDoorToward (ex,ey) wls = wls & wlLine %~ mvPs (ex,ey)
|
||||
--moveDoorToward speed (ex,ey) wls = wls & wlLine %~ mvPs (ex,ey)
|
||||
moveDoorToward speed (ex,ey) wls = wls & wlLine %~ bimap (f ex) (f ey)
|
||||
where
|
||||
f !p = mvPointTowardAtSpeed speed p
|
||||
|
||||
zoneps :: (Point2, Point2) -> [(Int,Int)]
|
||||
{-# INLINE zoneps #-}
|
||||
|
||||
Reference in New Issue
Block a user