Exemple #1
0
        protected void Apply(ThingGrabbedEvent e)
        {
            var id = _ids.SingleOrDefault(x => x == e.Id);

            if (id is not null)
            {
                _ids.Remove(id);
            }
        }
Exemple #2
0
        private void Apply(ThingGrabbedEvent e)
        {
            foreach (var pair in _things)
            {
                var match = pair.Value.SingleOrDefault(x => x == e.Id);

                if (match is not null)
                {
                    pair.Value.Remove(match);
                    break;
                }
            }

            _weights.Remove(e.Id);
        }
Exemple #3
0
        private void Apply(ThingGrabbedEvent e)
        {
            var theThing = _things.SingleOrDefault(x => x.Id == e.Id);

            _things.Remove(theThing);
        }