public override State tryTrans() { if (!centerController.chargeArm.isEnabled()) { return(new IdleWithArmState(centerController, true)); } Animator animator = centerController.playerAni; AnimatorStateInfo info = animator.GetCurrentAnimatorStateInfo(0); // 判断动画是否播放完成 if (info.normalizedTime >= 1.0f) { if (centerController.slimeArm.isGrabingThing()) { centerController.slimeArm.deactivate(); centerController.addChargingForce(); } else if (centerController.getArmController().isHiting()) { Debug.Log("addcharge"); centerController.addChargingForce(); } return(new IdleWithArmState(centerController, true)); } return(this); }