Exemple #1
0
 public void SubjectUpdated()
 {
     _currentMainStreamState = _subject.MainStreamState;
     if (_currentMainStreamState == ThisState())
     {
         _mainStream = true;
     }
     else
     {
         _mainStream = false;
     }
 }
Exemple #2
0
        private void AddMainStreamEventHandlers(AutoStrategy strategy)
        {
            strategy.RequestMainStream += (s, e) =>
            {
                if (MainStreamState != MainStreamState.Attack)
                {
                    return;
                }

                MainStreamState = strategy.ThisState();
                Notify();
            };

            strategy.ReleaseMainStream += (s, e) =>
            {
                if (MainStreamState == MainStreamState.Attack)
                {
                    MainStreamState = MainStreamState.PickItem;
                }

                MainStreamState = MainStreamState.Attack;
                Notify();
            };
        }