private void InstantiateSquares(GameObject plaque, Vector3 position, Quaternion rot, Position pos, int row, int col, Board board) { GameObject square = (GameObject)Instantiate(plaque, position, rot); coordonnees.Add(position, square); square.GetComponent <ChessElement>().Position = pos; square.transform.parent = GameObject.FindGameObjectWithTag("board").transform; board.AddASquare(new Vector2(row + 1, col + 1), square); /* * GameObject g = new GameObject(); * g.AddComponent<TextMesh>(); * g.transform.position = position + new Vector3(0, tailleCase / 2, 0); * g.GetComponent<TextMesh>().fontSize = 200; * g.GetComponent<TextMesh>().color = Color.red; * g.GetComponent<TextMesh>().transform.rotation *= Quaternion.Euler(Vector3.right * 90); * g.GetComponent<TextMesh>().text = "" + ((char)((char)'A' + (row))) + "," + (col + 1); * g.transform.parent = GameObject.FindGameObjectWithTag("board").transform;*/ }