void OnMouseButtonHeld(object sender, MouseEventArgs e) { PointerAction action = null; Point pointerPosition = e.currentState.Position; if (mouseBindings.TryGetValue(new MouseBinding(e.button, InputState.held), out action)) { action?.Invoke(pointerPosition); } }
// Update is called once per frame void Update() { if (Input.GetMouseButtonUp(0)) { PrimaryMouseClicked?.Invoke(); } if (Input.GetMouseButtonUp(1)) { SecondaryMouseClicked?.Invoke(); } }
public void OnPointerDisplayModeReset() { PointerDisplayModeReset?.Invoke(); }