///<summary>互斥动作的处理</summary> void huchi_action() { if (hP_script.downing_value <= 0) //受伤倒地 { hurt_up_delay += Time.fixedDeltaTime; attackSystem.attackObject_Recover_one(2); if (hurt_up_delay >= hP_script.downing_noeffect_time - 0.18f) { ani.SetBool("hurt_down", false); ani.SetBool("hurt_up", true); aduioplayer.play_ation_audio_once(5, 4, transform.position); } else { ani.SetLayerWeight(3, 1); ani.SetBool("hurt_down", true); aduioplayer.play_ation_audio_once(4, 5, transform.position); } if (action_ani_number != 0) //重置动作 { ani.SetBool(action_ani_name[action_ani_arraynumber][action_ani_number - 1], false); action_ani_number = 0; trailingmesh_1.setUnVisual(); trailingmesh_2.setUnVisual(); } action_ani_doing = false; additional_ani_doing = false; ani.SetBool(additional_ani_name[additional_ani_number], false); ani.SetLayerWeight(1, 0); ani.SetBool("defult", true); setWASDandSpaceDefult(); //将WASD和空格相关的动画设置为默认状态 } else { hurt_up_delay = 0; ani.SetLayerWeight(3, 0); ani.SetBool("hurt_up", false); if (hP_script.recovering) //如果出现受伤僵直 { ani.SetLayerWeight(3, Mathf.Lerp(ani.GetLayerWeight(3), 0.8f, 0.8f)); ani.SetBool(action_ani_name[action_ani_name.Length - 1][0], true); attackSystem.attackObject_Recover_one(2); if (action_ani_number != 0) //重置动作 { ani.SetBool(action_ani_name[action_ani_arraynumber][action_ani_number - 1], false); action_ani_number = 0; trailingmesh_1.setUnVisual(); trailingmesh_2.setUnVisual(); } action_ani_doing = false; additional_ani_doing = false; ani.SetBool(additional_ani_name[additional_ani_number], false); ani.SetLayerWeight(1, 0); ani.SetBool("defult", true); setWASDandSpaceDefult(); //将WASD和空格相关的动画设置为默认状态 } else { ani.SetLayerWeight(3, Mathf.Lerp(ani.GetLayerWeight(3), 0, 0.8f)); ani.SetBool(action_ani_name[action_ani_name.Length - 1][0], false); huchi_action_gongji(); //互斥动作中攻击部分的处理(含WASD和空格) hunhe_action(); //混合动作的处理 } } }