예제 #1
0
        public override bool visitContains(MapItemIterator mapItemIterator, IGameObject gameObject)
        {
            MapItemRepository repository = mapItemIterator.GetMapItemRepository();
            bool contains = false;

            while (!mapItemIterator.IsDone())
            {
                if (gameObject == (IGameObject)mapItemIterator.CurrentItem())
                {
                    contains = true;
                }
                mapItemIterator.Next();
            }
            return(contains);
        }
예제 #2
0
        public override IGameObject visitLast(MapItemIterator mapItemIterator)
        {
            if (mapItemIterator == null)
            {
            }
            MapItemRepository repository = mapItemIterator.GetMapItemRepository();
            IGameObject       lastItem   = null;

            while (!mapItemIterator.IsDone())
            {
                lastItem = (IGameObject)mapItemIterator.CurrentItem();
                mapItemIterator.Next();
            }

            return(lastItem);
        }