在Dash_Skill函数中,debug.log("Dash_Out")是开启的,但“Dash_In”却没有开启。我也添加了另一个函数Tap_Skill,它正常工作。已检查输入,两者相同。以下是代码:
public void Dash_Skill(InputAction.CallbackContext context) {
if (Can_Skill == true) {
Debug.Log("Dash_In");
StartCoroutine(Tap_Skill_Coroutine());
}
Debug.Log("Dash_Out");
}
public void Tap_Skill(InputAction.CallbackContext context) {
if (Can_Skill == true) {
Debug.Log("fire");
StartCoroutine(Tap_Skill_Coroutine());
}
}
我怀疑问题出在Dash_Skill函数的顺序上,Debug.Log("Dash_Out")应该在if语句块内。
评论 (0)