Пример #1
0
        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);
            }
        }
Пример #2
0
        // Update is called once per frame
        void Update()
        {
            if (Input.GetMouseButtonUp(0))
            {
                PrimaryMouseClicked?.Invoke();
            }

            if (Input.GetMouseButtonUp(1))
            {
                SecondaryMouseClicked?.Invoke();
            }
        }
Пример #3
0
 public void OnPointerDisplayModeReset()
 {
     PointerDisplayModeReset?.Invoke();
 }