예제 #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;
            }
        }
예제 #2
0
 private void UpdateVisualState(InteractableStateChangeArgs args) => UpdateVisual();
예제 #3
0
 private void HandleStateChange(InteractableStateChangeArgs args)
 {
     UpdateState();
 }