Implement terminals
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
{- | Basic collision detection for a moving point -}
|
||||
module Dodge.Base.Collide
|
||||
( hasLOS
|
||||
, hasButtonLOS
|
||||
, reflectPointWalls
|
||||
, ssfold
|
||||
, collidePointUpToIndirectMinDist
|
||||
@@ -25,6 +26,12 @@ hasLOS :: Point2 -> Point2 -> World -> Bool
|
||||
{-# INLINE hasLOS #-}
|
||||
hasLOS p1 p2 = not . pointHitsWalls p1 p2 . wallsAlongLine p1 p2
|
||||
|
||||
hasButtonLOS :: Point2 -> Point2 -> World -> Bool
|
||||
{-# INLINE hasButtonLOS #-}
|
||||
hasButtonLOS p1 p2 = not . pointHitsWalls p1 p2
|
||||
. IM.filter (not . _wlTouchThrough)
|
||||
. wallsAlongLine p1 p2
|
||||
|
||||
--hitPointLines
|
||||
-- :: Point2
|
||||
-- -> Point2
|
||||
|
||||
Reference in New Issue
Block a user