示例#1
0
        private void RemoveNotConnectedBlocks()
        {
            IDictionary <BlockPosition, ILiveBlock> blocks = new Dictionary <BlockPosition, ILiveBlock>(_blocks);

            StructureUtilities.RemoveConnected(blocks[_mainframePosition], blocks);
            foreach (RealLiveBlock real in blocks.Values.OfType <RealLiveBlock>())
            {
                Health -= real.Health;
                RemoveBlock(real);
            }
        }
示例#2
0
        public IDictionary <BlockPosition, IPlacedBlock> GetNotConnectedBlocks()
        {
            if (_mainframePosition == null)
            {
                return(null);
            }

            IDictionary <BlockPosition, IPlacedBlock> blocks = new Dictionary <BlockPosition, IPlacedBlock>(_blocks);

            StructureUtilities.RemoveConnected(blocks[_mainframePosition], blocks);
            return(blocks);
        }