Exemplo n.º 1
0
    public void SetCellValue(Cell cell, CellValue cellBlock)
    {
        if (terrainV2 == null)
        {
            return;
        }
        var v2Id = cell.ToInt3() + GetV2Offset();

        if (!terrainV2.IsInBound(v2Id))
        {
            return;
        }
        var args = new SetCellRpcJsonable {
            cell = cell, value = cellBlock
        };

        SetCellLocally(args.value, args.cell);
        photonView.RPC("SetCellValueRPC", PhotonTargets.AllViaServer, JsonUtility.ToJson(args));
    }