public void TurnPieceVisible(int j, int index) { if (amountOfCards == 0) { return; } //int j = serverData.AddOnListOfCards(); //Debug.Log("Numero sorteado: " + j); if (fullDeck == null) { Debug.LogError("fullDeck deu ruim"); } GameObject thisPiece = Pieces[j]; if (thisPiece == null) { Debug.LogError("thisPiece deu ruim"); } thisPiece.transform.SetParent(playerHand, true); thisPiece.transform.position = new Vector3(0, 0, 0); thisPiece.transform.rotation = new Quaternion(0, 0, 0, 0); //thisPiece.GetComponent<Renderer>().sortingLayerName = "PiecesInHand"; if (Pieces[j].GetComponent <DraggablePiece>().isDouble) { serverData.AddMyBombs(Pieces[j].GetComponentInChildren <PieceBehaviour>().value); if (Pieces[j].GetComponentInChildren <PieceBehaviour>().value > serverData.biggestBomb) { serverData.biggestBomb = Pieces[j].GetComponentInChildren <PieceBehaviour>().value; } } for (int k = 0; k < 2; k++) { AllAvailableValues.Add(Pieces[j].GetComponent <DraggablePiece>().ValuesInThisPiece[k]); } serverData.SubtractCard(); fullDeck[j] = true; serverData.SavePickedPieces(j, true); //serverData.PrintInformationTest(PhotonNetwork.NickName, j, amountOfCards, index); }