public void SetCallbacks(ICubeActions instance) { if (m_Wrapper.m_CubeActionsCallbackInterface != null) { Move.started -= m_Wrapper.m_CubeActionsCallbackInterface.OnMove; Move.performed -= m_Wrapper.m_CubeActionsCallbackInterface.OnMove; Move.cancelled -= m_Wrapper.m_CubeActionsCallbackInterface.OnMove; Reset.started -= m_Wrapper.m_CubeActionsCallbackInterface.OnReset; Reset.performed -= m_Wrapper.m_CubeActionsCallbackInterface.OnReset; Reset.cancelled -= m_Wrapper.m_CubeActionsCallbackInterface.OnReset; LoadSecretLevel.started -= m_Wrapper.m_CubeActionsCallbackInterface.OnLoadSecretLevel; LoadSecretLevel.performed -= m_Wrapper.m_CubeActionsCallbackInterface.OnLoadSecretLevel; LoadSecretLevel.cancelled -= m_Wrapper.m_CubeActionsCallbackInterface.OnLoadSecretLevel; } m_Wrapper.m_CubeActionsCallbackInterface = instance; if (instance != null) { Move.started += instance.OnMove; Move.performed += instance.OnMove; Move.cancelled += instance.OnMove; Reset.started += instance.OnReset; Reset.performed += instance.OnReset; Reset.cancelled += instance.OnReset; LoadSecretLevel.started += instance.OnLoadSecretLevel; LoadSecretLevel.performed += instance.OnLoadSecretLevel; LoadSecretLevel.cancelled += instance.OnLoadSecretLevel; } }
public void SetCallbacks(ICubeActions instance) { if (m_Wrapper.m_CubeActionsCallbackInterface != null) { @Jump.started -= m_Wrapper.m_CubeActionsCallbackInterface.OnJump; @Jump.performed -= m_Wrapper.m_CubeActionsCallbackInterface.OnJump; @Jump.canceled -= m_Wrapper.m_CubeActionsCallbackInterface.OnJump; @Dash.started -= m_Wrapper.m_CubeActionsCallbackInterface.OnDash; @Dash.performed -= m_Wrapper.m_CubeActionsCallbackInterface.OnDash; @Dash.canceled -= m_Wrapper.m_CubeActionsCallbackInterface.OnDash; @Shoot.started -= m_Wrapper.m_CubeActionsCallbackInterface.OnShoot; @Shoot.performed -= m_Wrapper.m_CubeActionsCallbackInterface.OnShoot; @Shoot.canceled -= m_Wrapper.m_CubeActionsCallbackInterface.OnShoot; @Block.started -= m_Wrapper.m_CubeActionsCallbackInterface.OnBlock; @Block.performed -= m_Wrapper.m_CubeActionsCallbackInterface.OnBlock; @Block.canceled -= m_Wrapper.m_CubeActionsCallbackInterface.OnBlock; @Movement.started -= m_Wrapper.m_CubeActionsCallbackInterface.OnMovement; @Movement.performed -= m_Wrapper.m_CubeActionsCallbackInterface.OnMovement; @Movement.canceled -= m_Wrapper.m_CubeActionsCallbackInterface.OnMovement; @RJoystick.started -= m_Wrapper.m_CubeActionsCallbackInterface.OnRJoystick; @RJoystick.performed -= m_Wrapper.m_CubeActionsCallbackInterface.OnRJoystick; @RJoystick.canceled -= m_Wrapper.m_CubeActionsCallbackInterface.OnRJoystick; } m_Wrapper.m_CubeActionsCallbackInterface = instance; if (instance != null) { @Jump.started += instance.OnJump; @Jump.performed += instance.OnJump; @Jump.canceled += instance.OnJump; @Dash.started += instance.OnDash; @Dash.performed += instance.OnDash; @Dash.canceled += instance.OnDash; @Shoot.started += instance.OnShoot; @Shoot.performed += instance.OnShoot; @Shoot.canceled += instance.OnShoot; @Block.started += instance.OnBlock; @Block.performed += instance.OnBlock; @Block.canceled += instance.OnBlock; @Movement.started += instance.OnMovement; @Movement.performed += instance.OnMovement; @Movement.canceled += instance.OnMovement; @RJoystick.started += instance.OnRJoystick; @RJoystick.performed += instance.OnRJoystick; @RJoystick.canceled += instance.OnRJoystick; } }