Generalise pathing, usable with flying creatures
This commit is contained in:
@@ -8,6 +8,7 @@ module Dodge.Creature.Picture (
|
||||
deadUpperBody,
|
||||
deadFeet,
|
||||
drawChaseCrit,
|
||||
drawHoverCrit,
|
||||
) where
|
||||
|
||||
import Linear
|
||||
@@ -50,6 +51,14 @@ basicCrShape cr
|
||||
crsize = 0.1 * crRad (cr ^. crType)
|
||||
rotmdir = rotateSH (_crMvDir cr - _crDir cr)
|
||||
|
||||
drawHoverCrit :: Creature -> Shape
|
||||
drawHoverCrit cr = colorSH (_skinUpper cskin)
|
||||
(overPosSH (Q.apply tpq) $ upperBoxHalf Medium Typical 2 $ square 5)
|
||||
where
|
||||
cskin = crShape $ _crType cr
|
||||
z = cr ^?! crStance . carriage . flyHeight
|
||||
tpq = (V3 0 0 z, Q.qid)
|
||||
|
||||
drawChaseCrit :: Creature -> Shape
|
||||
drawChaseCrit cr = mconcat
|
||||
[ chaseUpperBody cr
|
||||
|
||||
Reference in New Issue
Block a user