Esempio n. 1
0
        private void MouseHandler(UIMouseEventType type, UpdateState state)
        {
            switch (type)
            {
            case UIMouseEventType.MouseOver:
                MouseOver = true;
                OnHoveredLevel?.Invoke(GetHoveredLevel(state));
                break;

            case UIMouseEventType.MouseOut:
                MouseOver = false;
                OnHoveredLevel?.Invoke(-1);
                break;

            case UIMouseEventType.MouseDown:
                OnClickedLevel?.Invoke(GetHoveredLevel(state));
                break;
            }
        }
Esempio n. 2
0
        private void MouseHandler(UIMouseEventType type, UpdateState state)
        {
            switch (type)
            {
            case UIMouseEventType.MouseOver:
                OnHoveredLevel?.Invoke(Level);
                break;

            case UIMouseEventType.MouseOut:
                OnHoveredLevel?.Invoke(-1);
                break;

            case UIMouseEventType.MouseDown:
                Highlight = -0.15f;
                break;

            case UIMouseEventType.MouseUp:
                SetHighlight(false);
                OnClickedLevel?.Invoke(Level);
                break;
            }
        }