diff options
Diffstat (limited to 'ActiveRagdoll/Assets/TABG/Scripts/Data/StepHandler.cs')
-rw-r--r-- | ActiveRagdoll/Assets/TABG/Scripts/Data/StepHandler.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Data/StepHandler.cs b/ActiveRagdoll/Assets/TABG/Scripts/Data/StepHandler.cs index f35f068..3caa488 100644 --- a/ActiveRagdoll/Assets/TABG/Scripts/Data/StepHandler.cs +++ b/ActiveRagdoll/Assets/TABG/Scripts/Data/StepHandler.cs @@ -11,7 +11,7 @@ namespace Rigging.Data public float staticCounter; - public Step steps; + public AnimationParam<Step> steps; public bool isLeft;//左脚还是右脚在前面 @@ -34,6 +34,7 @@ namespace Rigging.Data animationHandler = player.status.animation; hip = player.body.hip.transform; } + steps.SetPlayer(player); } protected override void OnUpdate() @@ -46,8 +47,8 @@ namespace Rigging.Data Switch(); } } - else if (counter > steps.minTime - && (steps.minAngle == 0f || steps.minAngle < Vector3.Angle(leftLeg.forward, rightLeg.forward)) + else if (counter > steps.current.minTime + && (steps.current.minAngle == 0f || steps.current.minAngle < Vector3.Angle(leftLeg.forward, rightLeg.forward)) && isLeft == hip.InverseTransformPoint(leftLeg.position + leftLeg.forward).z > hip.InverseTransformPoint(rightLeg.position + rightLeg.forward).z) { Switch(); |