Work on chase crit animations, eating dead bees

This commit is contained in:
2026-05-28 22:55:52 +01:00
parent eb817d34ef
commit 03f83fc924
12 changed files with 541 additions and 370 deletions
+21 -22
View File
@@ -5,9 +5,10 @@ import qualified Data.Map.Strict as M
import Dodge.Data.Creature
import Dodge.Data.FloatFunction
import Geometry.Data
--import qualified IntMapHelp as IM
--import Picture
--import MaybeHelp
-- import qualified IntMapHelp as IM
-- import Picture
-- import MaybeHelp
defaultCreature :: Creature
defaultCreature =
@@ -15,27 +16,27 @@ defaultCreature =
{ _crPos = V3 0 0 0
, _crOldPos = V3 0 0 0
, _crOldOldPos = V3 0 0 0
-- , _crZ = 0
-- , _crZVel = 0
, _crDir = 0
, _crMvDir = 0
-- , _crMvAim = 0
-- , _crTwist = 0
, _crID = 1
, _crType = ChaseCrit 0 LeftForward 0
-- , _crRad = 10
, _crType =
ChaseCrit
{ _meleeCooldown = 0
, _footForward = LeftForward
, _strideAmount = 0
, _chaseqy0 = 0
, _chaseqy1 = 0.45 * pi
, _chaseqy2 = -0.9*pi
, _chaseqy3 = 0.45*pi
, _chaseqz = 0
, _chaseLerp = 0
, _chaseKState = UprightCK
}
, _crHP = HP 100
-- , _crMaxHP = 150
, _crInv = mempty
-- , _crInvCapacity = 25
, _crDamage = []
-- , _crCorpse = MakeDefaultCorpse
-- , _crMaterial = Flesh
, _crPain = 0
-- , _crInvEquipped = mempty
, _crEquipment = M.empty
-- , _crInvHotkeys = mempty
-- , _crHotkeys = M.empty
, _crStance =
Stance
{ _carriage = Walking
@@ -49,13 +50,12 @@ defaultCreature =
, _crIntention = defaultIntention
, _crGroup = LoneWolf
, _crName = "DEFAULTCRNAME"
-- , _crStatistics = CreatureStatistics 50 50 50
, _crDeathTimer = Nothing
, _crWallTouch = mempty
}
--defaultCreatureSkin :: CreatureType
--defaultCreatureSkin = Humanoid (greyN 0.9) (lightx4 green) (greyN 0.3) InanimateAI
-- defaultCreatureSkin :: CreatureType
-- defaultCreatureSkin = Humanoid (greyN 0.9) (lightx4 green) (greyN 0.3) InanimateAI
defaultInanimate :: Creature
defaultInanimate = defaultCreature & crActionPlan .~ Inanimate
@@ -101,15 +101,14 @@ defaultIntention =
, _viewPoint = Nothing
}
defaultAimingCrit :: Creature
defaultAimingCrit = defaultCreature
yourDefaultStrideLength :: Float
yourDefaultStrideLength = 35
--defaultState :: CreatureState
--defaultState =
-- defaultState :: CreatureState
-- defaultState =
-- CrSt
-- { _csDamage = []
---- , _csSpState = GenCr