// Genera una ficha del jugador 2 void SpawnPlayer2Piece(int x, int y, string pieceName, int pieceNumber) { matrixAttributes = playerPrefab2[pieceNumber].GetComponent<MatrixAttributes>(); matrixAttributes.x = x; matrixAttributes.y = y; spawningPosition = GameObject.Find(pieceName).transform.position; Instantiate(playerPrefab2[pieceNumber], spawningPosition, playerPrefab2[pieceNumber].transform.rotation); }
// Genera la pelota private void SpawnBall() { matrixAttributes = ballPrefab.GetComponent<MatrixAttributes>(); matrixAttributes.x = 7; matrixAttributes.y = 5; spawningPosition = GameObject.Find("75").transform.position; Instantiate(ballPrefab, spawningPosition, ballPrefab.transform.rotation); }