Exemplo n.º 1
0
        public void Handle(RoomUser user, Team team, RoomItem iItem)
        {
            InteractorGenericSwitch.DoAnimation(item);
            Queue <RoomItem> toRemove = new Queue <RoomItem>();

            foreach (var _item in items)
            {
                if (room.GetRoomItemHandler().GetItem(_item.Id) == null)
                {
                    toRemove.Enqueue(_item);
                    continue;
                }

                /*if(_item.Coordinate == item.Coordinate)
                 * {
                 *  continue;
                 * }*/

                handler.RequestStackHandleEffects(_item.Coordinate, null, user, Team.none);
            }

            while (toRemove.Count > 0)
            {
                RoomItem itemToRemove = toRemove.Dequeue();
                if (items.Contains(itemToRemove))
                {
                    items.Remove(itemToRemove);
                }
            }
        }