public void OnBlockCellChanged(PacketHeader header, Connection connection, NetworkCell cell) { Console.WriteLine("JUST RECEIVED NEW CELL!!!"); Cell newCell = cell.ToCell(); Block.PlaceBlock(newCell, newCell.block); }
public void ChangeCell(Cell blockCell, CellChangeType change) { NetworkCell newCell = blockCell.ToNetworkCell(); switch (change) { case CellChangeType.RemoveBlock: newCell.block = null; break; case CellChangeType.PlaceBlock: blockCells.Add(blockCell); // ????? break; } serverConnection.SendObject("CellChanged", newCell); }