public void SetCallbacks(IPlayerControllerActions instance) { if (m_Wrapper.m_PlayerControllerActionsCallbackInterface != null) { @Yaw.started -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnYaw; @Yaw.performed -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnYaw; @Yaw.canceled -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnYaw; @Pitch.started -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnPitch; @Pitch.performed -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnPitch; @Pitch.canceled -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnPitch; @Roll.started -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnRoll; @Roll.performed -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnRoll; @Roll.canceled -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnRoll; @PlaneMovement.started -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnPlaneMovement; @PlaneMovement.performed -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnPlaneMovement; @PlaneMovement.canceled -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnPlaneMovement; } m_Wrapper.m_PlayerControllerActionsCallbackInterface = instance; if (instance != null) { @Yaw.started += instance.OnYaw; @Yaw.performed += instance.OnYaw; @Yaw.canceled += instance.OnYaw; @Pitch.started += instance.OnPitch; @Pitch.performed += instance.OnPitch; @Pitch.canceled += instance.OnPitch; @Roll.started += instance.OnRoll; @Roll.performed += instance.OnRoll; @Roll.canceled += instance.OnRoll; @PlaneMovement.started += instance.OnPlaneMovement; @PlaneMovement.performed += instance.OnPlaneMovement; @PlaneMovement.canceled += instance.OnPlaneMovement; } }
public void SetCallbacks(IPlayerControllerActions instance) { if (m_Wrapper.m_PlayerControllerActionsCallbackInterface != null) { @Move.started -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnMove; @Move.performed -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnMove; @Move.canceled -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnMove; @Jump.started -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnJump; @Jump.performed -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnJump; @Jump.canceled -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnJump; @Hover.started -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnHover; @Hover.performed -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnHover; @Hover.canceled -= m_Wrapper.m_PlayerControllerActionsCallbackInterface.OnHover; } m_Wrapper.m_PlayerControllerActionsCallbackInterface = instance; if (instance != null) { @Move.started += instance.OnMove; @Move.performed += instance.OnMove; @Move.canceled += instance.OnMove; @Jump.started += instance.OnJump; @Jump.performed += instance.OnJump; @Jump.canceled += instance.OnJump; @Hover.started += instance.OnHover; @Hover.performed += instance.OnHover; @Hover.canceled += instance.OnHover; } }