浏览代码

changed input phase check to match best practices

/main
kgc00 4 年前
当前提交
caba7de7
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 10
      UOP1_Project/Assets/Scripts/Input/InputReader.cs

10
UOP1_Project/Assets/Scripts/Input/InputReader.cs


public void OnAttack(InputAction.CallbackContext context)
{
if (attackEvent != null
&& context.phase == InputActionPhase.Started)
&& context.phase == InputActionPhase.Performed)
attackEvent.Invoke();
}

&& context.phase == InputActionPhase.Started)
&& context.phase == InputActionPhase.Performed)
extraActionEvent.Invoke();
}

&& context.phase == InputActionPhase.Started)
&& context.phase == InputActionPhase.Performed)
interactEvent.Invoke();
}

&& context.phase == InputActionPhase.Started)
&& context.phase == InputActionPhase.Performed)
jumpEvent.Invoke();
if (jumpCanceledEvent != null

public void OnPause(InputAction.CallbackContext context)
{
if (pauseEvent != null
&& context.phase == InputActionPhase.Started)
&& context.phase == InputActionPhase.Performed)
pauseEvent.Invoke();
}

正在加载...
取消
保存