public void SetCallbacks(IRobotActions instance) { if (m_Wrapper.m_RobotActionsCallbackInterface != null) { @HorizontalMovement.started -= m_Wrapper.m_RobotActionsCallbackInterface.OnHorizontalMovement; @HorizontalMovement.performed -= m_Wrapper.m_RobotActionsCallbackInterface.OnHorizontalMovement; @HorizontalMovement.canceled -= m_Wrapper.m_RobotActionsCallbackInterface.OnHorizontalMovement; @Throw.started -= m_Wrapper.m_RobotActionsCallbackInterface.OnThrow; @Throw.performed -= m_Wrapper.m_RobotActionsCallbackInterface.OnThrow; @Throw.canceled -= m_Wrapper.m_RobotActionsCallbackInterface.OnThrow; @MoveWrench.started -= m_Wrapper.m_RobotActionsCallbackInterface.OnMoveWrench; @MoveWrench.performed -= m_Wrapper.m_RobotActionsCallbackInterface.OnMoveWrench; @MoveWrench.canceled -= m_Wrapper.m_RobotActionsCallbackInterface.OnMoveWrench; } m_Wrapper.m_RobotActionsCallbackInterface = instance; if (instance != null) { @HorizontalMovement.started += instance.OnHorizontalMovement; @HorizontalMovement.performed += instance.OnHorizontalMovement; @HorizontalMovement.canceled += instance.OnHorizontalMovement; @Throw.started += instance.OnThrow; @Throw.performed += instance.OnThrow; @Throw.canceled += instance.OnThrow; @MoveWrench.started += instance.OnMoveWrench; @MoveWrench.performed += instance.OnMoveWrench; @MoveWrench.canceled += instance.OnMoveWrench; } }
public void SetCallbacks(IRobotActions instance) { if (m_Wrapper.m_RobotActionsCallbackInterface != null) { @Move.started -= m_Wrapper.m_RobotActionsCallbackInterface.OnMove; @Move.performed -= m_Wrapper.m_RobotActionsCallbackInterface.OnMove; @Move.canceled -= m_Wrapper.m_RobotActionsCallbackInterface.OnMove; @Aim.started -= m_Wrapper.m_RobotActionsCallbackInterface.OnAim; @Aim.performed -= m_Wrapper.m_RobotActionsCallbackInterface.OnAim; @Aim.canceled -= m_Wrapper.m_RobotActionsCallbackInterface.OnAim; @Shoot.started -= m_Wrapper.m_RobotActionsCallbackInterface.OnShoot; @Shoot.performed -= m_Wrapper.m_RobotActionsCallbackInterface.OnShoot; @Shoot.canceled -= m_Wrapper.m_RobotActionsCallbackInterface.OnShoot; @StopShoot.started -= m_Wrapper.m_RobotActionsCallbackInterface.OnStopShoot; @StopShoot.performed -= m_Wrapper.m_RobotActionsCallbackInterface.OnStopShoot; @StopShoot.canceled -= m_Wrapper.m_RobotActionsCallbackInterface.OnStopShoot; @Jump.started -= m_Wrapper.m_RobotActionsCallbackInterface.OnJump; @Jump.performed -= m_Wrapper.m_RobotActionsCallbackInterface.OnJump; @Jump.canceled -= m_Wrapper.m_RobotActionsCallbackInterface.OnJump; } m_Wrapper.m_RobotActionsCallbackInterface = instance; if (instance != null) { @Move.started += instance.OnMove; @Move.performed += instance.OnMove; @Move.canceled += instance.OnMove; @Aim.started += instance.OnAim; @Aim.performed += instance.OnAim; @Aim.canceled += instance.OnAim; @Shoot.started += instance.OnShoot; @Shoot.performed += instance.OnShoot; @Shoot.canceled += instance.OnShoot; @StopShoot.started += instance.OnStopShoot; @StopShoot.performed += instance.OnStopShoot; @StopShoot.canceled += instance.OnStopShoot; @Jump.started += instance.OnJump; @Jump.performed += instance.OnJump; @Jump.canceled += instance.OnJump; } }