// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { oldspeed = sc.speed; sc.speed = 0f; sc.ChangeSpeed(); os.pause = true; dc.isGettingHit = true; }
private void ChangeSpeed(float newspeed) { sc.speed = newspeed; sc.ChangeSpeed(); }
public void TweenSpeed(float x) { sc.speed = x; sc.ChangeSpeed(); }