Commit before reorganising level generation

This commit is contained in:
2021-11-16 14:48:37 +00:00
parent f530952612
commit cb8cbe03a4
8 changed files with 37 additions and 90 deletions
+4
View File
@@ -1,6 +1,7 @@
module Dodge.Creature.Property
( crIsArmouredFrom
, crNearSeg
, crNearPoint
) where
import Dodge.Data
import Dodge.Item.Data
@@ -20,3 +21,6 @@ crIsArmouredFrom p cr
crNearSeg :: Float -> Point2 -> Point2 -> Creature -> Bool
crNearSeg d p1 p2 cr = circOnSeg p1 p2 (_crPos cr) (_crRad cr + d)
crNearPoint :: Float -> Point2 -> Creature -> Bool
crNearPoint d p cr = dist (_crPos cr) p < d + _crRad cr