tracer/src/Types/Collidible.hs

114 lines
3.4 KiB
Haskell
Raw Normal View History

{-# LANGUAGE MultiParamTypeClasses #-}
module Types.Collidible where
-- internal imports
import Types.Map (Boundaries(..))
import Types.ImgId (ImgId(..))
import Types.Animation (AnimState(..))
class Collidible c where
collisionObstacle :: c -> [(Boundaries Double)]
instance Collidible ImgId where
collisionObstacle ImgMiscBox1 =
[ Boundaries (0.2, 0.34) (0.8, 1)
]
collisionObstacle ImgWallAsc =
[ Boundaries (0.34, 0) (0.66, 1)
]
collisionObstacle ImgWallDesc =
[ Boundaries (0, 0.34) (1, 0.66)
]
collisionObstacle ImgWallCornerN =
[ Boundaries (0, 0.34) (0.66, 0.66)
, Boundaries (0.34, 0.34) (0.66, 1)
]
collisionObstacle ImgWallCornerE =
[ Boundaries (0.34, 0.34) (1, 0.66)
, Boundaries (0.34, 0.34) (0.66, 1)
]
collisionObstacle ImgWallCornerS =
[ Boundaries (0.34, 0.34) (1, 0.66)
, Boundaries (0.34, 0) (0.66, 0.66)
]
collisionObstacle ImgWallCornerW =
[ Boundaries (0, 0.34) (0.66, 0.66)
, Boundaries (0.34, 0) (0.66, 0.66)
]
collisionObstacle ImgWallTNE =
[ Boundaries (0, 0.34) (1, 0.66)
, Boundaries (0.34, 0.34) (0.66, 1)
]
collisionObstacle ImgWallTSW =
[ Boundaries (0, 0.34) (1, 0.66)
, Boundaries (0.34, 0) (0.66, 0.66)
]
collisionObstacle ImgWallTSE =
[ Boundaries (0.34, 0) (0.66, 1)
, Boundaries (0.34, 0.34) (1, 0.66)
]
collisionObstacle ImgWallTNW =
[ Boundaries (0.34, 0) (0.66, 1)
, Boundaries (0, 0.34) (0.66, 0.66)
]
collisionObstacle ImgWallCross =
[ Boundaries (0.34, 0) (0.66, 1)
, Boundaries (0, 0.34) (1, 0.66)
]
collisionObstacle ImgTableSW =
[ Boundaries (0, 0.34) (1, 1)
]
collisionObstacle ImgTableNW =
2018-11-16 20:38:44 +00:00
[ Boundaries (0.34, 0) (1, 1)
]
collisionObstacle ImgTableNE =
[ Boundaries (0, 0) (1, 0.63)
]
collisionObstacle ImgTableSE =
2018-11-16 20:38:44 +00:00
[ Boundaries (0, 0) (0.63, 1)
]
2018-07-31 11:30:17 +00:00
collisionObstacle ImgTableCorner =
[ Boundaries (0, 0) (0.63, 1)
, Boundaries (0, 0.34) (1, 1)
]
2018-07-31 21:07:23 +00:00
collisionObstacle ImgTableC1 =
[ Boundaries (0, 13/36) (13/36, 1)
]
collisionObstacle ImgTableC2 =
[ Boundaries (0, 0) (13/36, 13/36)
]
collisionObstacle ImgTableC3 =
[ Boundaries (1-13/36, 0) (1, 1-13/36)
]
collisionObstacle ImgTableC4 =
[ Boundaries (1-13/36, 1-13/36) (1, 1)
]
2018-07-30 13:34:45 +00:00
collisionObstacle ImgMiscFlipchart =
[ Boundaries (0, 7/36) (18/36, 28/36)
]
2018-07-31 11:30:17 +00:00
collisionObstacle ImgMiscPlant1 =
2018-09-19 18:17:47 +00:00
[ Boundaries (9/36, 9/36) (27/36, 27/36)
2018-07-31 11:30:17 +00:00
]
2018-07-31 20:59:25 +00:00
collisionObstacle ImgMiscPlant2 =
2018-09-19 18:17:47 +00:00
[ Boundaries (9/36, 9/36) (27/36, 27/36)
2018-07-31 20:59:25 +00:00
]
2018-08-07 12:04:49 +00:00
collisionObstacle ImgMiscWatercooler =
[ Boundaries (14/36, 14/36) (22/36, 22/36)
]
2019-01-10 17:31:36 +00:00
collisionObstacle ImgMiscVending =
[ Boundaries (0, 2/36) (24/36, 34/36)
]
2019-01-15 04:28:09 +00:00
collisionObstacle ImgCabinetCoffeeSW = collisionObstacle ImgTableSW
collisionObstacle ImgCabinetCoffeeSE = collisionObstacle ImgTableSE
collisionObstacle ImgCabinetSinkSW = collisionObstacle ImgTableSW
collisionObstacle ImgCabinetSinkSE = collisionObstacle ImgTableSE
collisionObstacle ImgCabinetStoveSW = collisionObstacle ImgTableSW
collisionObstacle ImgCabinetStoveSE = collisionObstacle ImgTableSE
2019-01-14 03:00:34 +00:00
collisionObstacle ImgCabinetSW = collisionObstacle ImgTableSW
2019-01-15 04:28:09 +00:00
collisionObstacle ImgCabinetSE = collisionObstacle ImgTableSE
collisionObstacle ImgCabinetCorner = collisionObstacle ImgTableCorner
2018-07-21 18:37:01 +00:00
collisionObstacle ImgEmptyNoWalk =
2019-01-15 04:28:09 +00:00
[ Boundaries (0, 0) (1, 1) ]
collisionObstacle _ = []