Refactor, try to limit dependencies
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user