示例#1
0
文件: BChunk.cs 项目: nauroman/Cells
        public void RemoveBlock(Block block, bool updateNeighbors)
        {
            /*
            blocks.Remove(block.posBlock.index);

            if (updateNeighbors)
            {                
                block.RemoveFromNeighbors();
//                block.BlockNeighbors.RemoveFromNeighbors();
//                RemoveBlockFromNeighbors(block);
            }
            */
        }
示例#2
0
文件: BChunk.cs 项目: nauroman/Cells
        //        void AddBlock(PosIndex posIndex, int type)
        public void AddBlock(Block block, bool update)
        {

            /*
            // FOR DEBUG!!! It's not necessary!!!
            if (!blocks.ContainsKey(block.pos.index))
            {
                blocks [block.posBlock.index] = block;

                if (update)
                {
                    block.UpdateNeighbors();
                    block.AddToNeighbors();
                    block.UpdateFacesCount();

                    UpdateMesh(false);
                }
            }*/

            //       Log.Add("AddBlock, blocks [block.posBlock.index]:" + blocks.Count.ToString());
        }