Continue to tweak death effects
This commit is contained in:
@@ -20,6 +20,7 @@ import Dodge.Data
|
||||
import Dodge.Clock
|
||||
import Dodge.Creature.HandPos (translateToRightHand,translateToLeftHand)
|
||||
import Dodge.Creature.Test
|
||||
import Dodge.Damage
|
||||
--import Dodge.Debug.Picture
|
||||
import Picture
|
||||
import Geometry
|
||||
@@ -210,7 +211,13 @@ arms cr = fst $ translateToRightHand cr aHand
|
||||
-- f i = negate 2 + negate 6 * fromIntegral (sLen - i) / fromIntegral sLen
|
||||
|
||||
deadScalp :: Creature -> Shape
|
||||
deadScalp = overPosSH (Q.rotateToZ (V3 1 0 0)) . translateSHz 10 . scalp
|
||||
deadScalp cr = deadRot cr . translateSHz 10 . scalp $ cr
|
||||
|
||||
deadRot :: Creature -> Shape -> Shape
|
||||
deadRot cr = overPosSH (Q.rotateToZ d)
|
||||
where
|
||||
d = maybe (V3 1 0 0) (addZ 0 . unitVectorAtAngle . subtract (_crDir cr+pi))
|
||||
(damageDirection . _crDamage $ _crState cr)
|
||||
|
||||
scalp :: Creature -> Shape
|
||||
{-# INLINE scalp #-}
|
||||
@@ -246,7 +253,7 @@ torso cr
|
||||
aShoulder = scaleSH (V3 10 10 1) baseShoulder
|
||||
|
||||
deadUpperBody :: Creature -> Shape
|
||||
deadUpperBody = overPosSH (Q.rotateToZ (V3 1 0 0)) . translateSHz (negate 10) . upperBody
|
||||
deadUpperBody cr = deadRot cr . translateSHz (negate 10) . upperBody $ cr
|
||||
|
||||
baseShoulder :: Shape
|
||||
{-# INLINE baseShoulder #-}
|
||||
|
||||
Reference in New Issue
Block a user