Ejemplo n.º 1
0
 internal void Pass()
 {
     _setter = Formation.FirstOrDefault(player => player.CurrentFunction == PlayerPositionType.Center);
     if (PassingStateChange != null)
     {
         PassingStateChange.Invoke(this, new TeamPassingEvent(this.Id, true));
     }
     _setter.Pass();
 }
Ejemplo n.º 2
0
        private void OnPlayerStateChange(object sender, EventArgs e)
        {
            var player = sender as Player;

            if (_setter == null)
            {
                return;
            }
            if (player.Id == _setter.Id && _setter.CurrentAction != PlayerAction.Pass)
            {
                PassingStateChange.Invoke(this, new TeamPassingEvent(Id, false));
                _setter = null;
            }
        }