Esempio n. 1
0
    void OnDeleteBlockNotify(object data)
    {
        //Debug.Log("OnDeleteBlockNotify");
        CSDeleteBlockNotify notify = NetworkManager.Deserialize <CSDeleteBlockNotify>(data);

        ChunkManager.RemoveBlock(notify.position.x, notify.position.y, notify.position.z);
    }
Esempio n. 2
0
        static void DeleteBlockNotify(Player player, CSVector3Int position)
        {
            CSDeleteBlockNotify notify = new CSDeleteBlockNotify
            {
                position = position
            };

            NetworkManager.Enqueue(player.socket, ENUM_CMD.CS_DELETE_BLOCK_NOTIFY, notify);
        }
Esempio n. 3
0
    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();
    }