public void RemoveBlock(Block block, bool updateNeighbors) { /* blocks.Remove(block.posBlock.index); if (updateNeighbors) { block.RemoveFromNeighbors(); // block.BlockNeighbors.RemoveFromNeighbors(); // RemoveBlockFromNeighbors(block); } */ }
// 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()); }