Beispiel #1
0
        internal void UpdateState(bool onHold)
        {
            IsDown = false;
            IsUp   = false;

            if (IsHold)
            {
                if (!onHold)
                {
                    IsUp = true;

                    UpOnce?.Invoke();
                    UpOnce = null;
                    Up?.Invoke();
                }
            }
            else
            {
                if (onHold)
                {
                    IsDown = true;
                    DownOnce?.Invoke();
                    DownOnce = null;
                    Down?.Invoke();
                }
            }

            IsHold = onHold;
            if (onHold)
            {
                HoldOnce?.Invoke();
                HoldOnce = null;
                Hold?.Invoke();
            }
        }
Beispiel #2
0
        private void HandleAction(string id, LineAction lineAction)
        {
            switch (lineAction.Action)
            {
            case LineActions.Air:
                Air?.Invoke(id, lineAction.Index);
                break;

            case LineActions.Dump:
                Dump?.Invoke(id, lineAction.Index);
                break;

            case LineActions.Screen:
                Screen?.Invoke(id, lineAction.Index);
                break;

            case LineActions.Hold:
                Hold?.Invoke(id, lineAction.Index);
                break;
            }
        }
Beispiel #3
0
 private void PressStoryBoard_Completed(object sender, object e)
 {
     Hold?.Invoke(this, true);
     ShowBubble();
     PressProgressBar.Visibility = Visibility.Collapsed;
 }