public InputManager(IntPtr handle) { m_WndProc = new WndProc(handle); m_WndProc.MouseWheel += OnMouseWheel; m_WndProc.MouseMove += OnMouseMove; m_WndProc.MouseUp += OnMouseUp; m_WndProc.MouseDown += OnMouseDown; m_WndProc.KeyDown += OnKeyDown; m_WndProc.KeyUp += OnKeyUp; m_WndProc.KeyChar += OnKeyChar; }
public void Dispose() { m_WndProc.MouseWheel -= OnMouseWheel; m_WndProc.MouseMove -= OnMouseMove; m_WndProc.MouseUp -= OnMouseUp; m_WndProc.MouseDown -= OnMouseDown; m_WndProc.KeyDown -= OnKeyDown; m_WndProc.KeyUp -= OnKeyUp; m_WndProc.KeyChar -= OnKeyChar; m_WndProc.Dispose(); m_WndProc = null; }