Skip to content

Commit

Permalink
Revert "Add error investigation"
Browse files Browse the repository at this point in the history
This reverts commit 3022f27.
  • Loading branch information
kochounoyume committed Jul 3, 2024
1 parent 428c018 commit b34b9a6
Showing 1 changed file with 6 additions and 34 deletions.
40 changes: 6 additions & 34 deletions Packages/PlayerControl/Runtime/PlayerController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Unity.TinyCharacterController.Check;
Expand Down Expand Up @@ -137,40 +136,13 @@ protected virtual void Start()

protected virtual void Update()
{
try
{
Animator.SetFloat(constants.Speed, CurrentSpeed);
}
catch (Exception e)
{
Exception ee = new Exception("Failed to set the speed parameter.", e);
Debug.LogException(ee);
throw;
}
try
{
Animator.SetBool(constants.IsGround, IsOnGround);
}
catch (Exception e)
{
Exception ee = new Exception("Failed to set the isGround parameter.", e);
Debug.LogException(ee);
throw;
}
Animator.SetFloat(constants.Speed, CurrentSpeed);
Animator.SetBool(constants.IsGround, IsOnGround);

try
{
Vector3 currentDirection = LocalDirection;
float deltaTime = Time.deltaTime;
Animator.SetFloat(constants.Forward, currentDirection.z, MoveDampTime, deltaTime);
Animator.SetFloat(constants.SideStep, currentDirection.x, MoveDampTime, deltaTime);
}
catch (Exception e)
{
Exception ee = new Exception("Failed to set the forward and sideStep parameters.", e);
Debug.LogException(ee);
throw;
}
Vector3 currentDirection = LocalDirection;
float deltaTime = Time.deltaTime;
Animator.SetFloat(constants.Forward, currentDirection.z, MoveDampTime, deltaTime);
Animator.SetFloat(constants.SideStep, currentDirection.x, MoveDampTime, deltaTime);
}

protected virtual void OnActionTriggered(in CallbackContext context)
Expand Down

0 comments on commit b34b9a6

Please sign in to comment.