void OnDeleteBlockNotify(object data) { //Debug.Log("OnDeleteBlockNotify"); CSDeleteBlockNotify notify = NetworkManager.Deserialize <CSDeleteBlockNotify>(data); ChunkManager.RemoveBlock(notify.position.x, notify.position.y, notify.position.z); }
static void DeleteBlockNotify(Player player, CSVector3Int position) { CSDeleteBlockNotify notify = new CSDeleteBlockNotify { position = position }; NetworkManager.Enqueue(player.socket, ENUM_CMD.CS_DELETE_BLOCK_NOTIFY, notify); }
void OnDeleteBlockNotify(object data) { //Debug.Log("OnDeleteBlockNotify"); CSDeleteBlockNotify notify = NetworkManager.Deserialize <CSDeleteBlockNotify>(data); foreach (CSVector3Int _pos in notify.position) { Vector3Int pos = _pos.ToVector3Int(); ChunkManager.RemoveBlock(pos); } ChunkManager.RebuildChunks(); }