Beispiel #1
0
        private void HandleStateChanged(InteractableStateChangeArgs args)
        {
            switch (args.NewState)
            {
            case InteractableState.Normal:
                if (args.PreviousState == InteractableState.Hover)
                {
                    _whenUnhover.Invoke();
                }

                break;

            case InteractableState.Hover:
                if (args.PreviousState == InteractableState.Normal)
                {
                    _whenHover.Invoke();
                }
                else if (args.PreviousState == InteractableState.Select)
                {
                    _whenUnselect.Invoke();
                }

                break;

            case InteractableState.Select:
                if (args.PreviousState == InteractableState.Hover)
                {
                    _whenSelect.Invoke();
                }

                break;
            }
        }
 private void UpdateVisualState(InteractableStateChangeArgs args) => UpdateVisual();
 private void HandleStateChange(InteractableStateChangeArgs args)
 {
     UpdateState();
 }