Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+8 -9
View File
@@ -1,15 +1,14 @@
module Dodge.Creature.State.WalkCycle
( updateWalkCycle
, footstepSideEffect
)
where
import Dodge.Data
module Dodge.Creature.State.WalkCycle (
updateWalkCycle,
footstepSideEffect,
) where
import Control.Lens
import Dodge.Data.World
import Dodge.SoundLogic
import Geometry.Data
import Sound.Data
import Control.Lens
updateWalkCycle :: Creature -> Creature
updateWalkCycle cr = case cr ^? crStance . carriage of
Just (Walking x ff) | x > maxStride -> cr & crStance . carriage .~ Walking 0 (normalGait ff)
@@ -35,7 +34,7 @@ makeFootstepSound currentStride maxStride ff p
| currentStride > maxStride = soundMultiFrom footor p (chooseFootSound ff) Nothing
| otherwise = id
where
footor = [FootstepSound 0,FootstepSound 1]
footor = [FootstepSound 0, FootstepSound 1]
chooseFootSound :: FootForward -> SoundID
chooseFootSound LeftForward = foot1S