public void SetCallbacks(IPlayerMapActions instance) { if (m_Wrapper.m_PlayerMapActionsCallbackInterface != null) { @Move.started -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMove; @Move.performed -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMove; @Move.canceled -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMove; @Jump.started -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnJump; @Jump.performed -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnJump; @Jump.canceled -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnJump; @Throw.started -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnThrow; @Throw.performed -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnThrow; @Throw.canceled -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnThrow; } m_Wrapper.m_PlayerMapActionsCallbackInterface = 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; @Throw.started += instance.OnThrow; @Throw.performed += instance.OnThrow; @Throw.canceled += instance.OnThrow; } }
public void SetCallbacks(IPlayerMapActions instance) { if (m_Wrapper.m_PlayerMapActionsCallbackInterface != null) { MoveUp.started -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMoveUp; MoveUp.performed -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMoveUp; MoveUp.canceled -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMoveUp; MoveRight.started -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMoveRight; MoveRight.performed -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMoveRight; MoveRight.canceled -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMoveRight; MoveDown.started -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMoveDown; MoveDown.performed -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMoveDown; MoveDown.canceled -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMoveDown; MoveLeft.started -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMoveLeft; MoveLeft.performed -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMoveLeft; MoveLeft.canceled -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnMoveLeft; EndPlayerTurn.started -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnEndPlayerTurn; EndPlayerTurn.performed -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnEndPlayerTurn; EndPlayerTurn.canceled -= m_Wrapper.m_PlayerMapActionsCallbackInterface.OnEndPlayerTurn; } m_Wrapper.m_PlayerMapActionsCallbackInterface = instance; if (instance != null) { MoveUp.started += instance.OnMoveUp; MoveUp.performed += instance.OnMoveUp; MoveUp.canceled += instance.OnMoveUp; MoveRight.started += instance.OnMoveRight; MoveRight.performed += instance.OnMoveRight; MoveRight.canceled += instance.OnMoveRight; MoveDown.started += instance.OnMoveDown; MoveDown.performed += instance.OnMoveDown; MoveDown.canceled += instance.OnMoveDown; MoveLeft.started += instance.OnMoveLeft; MoveLeft.performed += instance.OnMoveLeft; MoveLeft.canceled += instance.OnMoveLeft; EndPlayerTurn.started += instance.OnEndPlayerTurn; EndPlayerTurn.performed += instance.OnEndPlayerTurn; EndPlayerTurn.canceled += instance.OnEndPlayerTurn; } }