// Otter.BasicLego newMovePiece(Otter.BasicLego piece, float tx, float ty, float tz){ // foreach(Otter.BasicLego brick in piece){ // setPiece(brick.getMesh(), Otter.MatrixOperations.opTranslate(tx, ty, tz)); // } // } Otter.BasicLego[] singlePiece(GameObject piece) { Otter.BasicLego[] brick = new Otter.BasicLego[1]; brick[0] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); return(brick); }
Otter.BasicLego[] noseDotPostion(GameObject piece) { Otter.BasicLego[] brick = new Otter.BasicLego[1]; brick[0] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); setPiece(brick[0].getMesh(), Otter.MatrixOperations.opRotate(90, Otter.MatrixOperations.AXIS.AX_X)); return(brick); }
Otter.BasicLego[] small2x1() { Otter.BasicLego[] brick = new Otter.BasicLego[2]; brick[0] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[1] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); setPiece(brick[1].getMesh(), Otter.MatrixOperations.opTranslate(-2, 0, 0)); return(brick); }
Otter.BasicLego[] doubleDiagonal() { Otter.BasicLego[] brick = new Otter.BasicLego[2]; brick[0] = Instantiate(diagonalPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[1] = Instantiate(diagonalPrefab).GetComponentInChildren <Otter.BasicLego>(); setPiece(brick[1].getMesh(), Otter.MatrixOperations.opTranslate(0, 0, -2)); return(brick); }
Otter.BasicLego[] regular1x2(GameObject piece) { Otter.BasicLego[] brick = new Otter.BasicLego[2]; brick[0] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); brick[1] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); setPiece(brick[1].getMesh(), Otter.MatrixOperations.opTranslate(0, 0, -2)); // Pieces.Add(brick); return(brick); }
// Otter.BasicLego[] neckConnectionPosition(GameObject piece){ // Otter.BasicLego[] brick = new Otter.BasicLego[1]; // brick[0] = Instantiate(piece).GetComponentInChildren<Otter.BasicLego>(); // setPiece(brick[0].getMesh(), Otter.MatrixOperations.opRotate(180, Otter.MatrixOperations.AXIS.AX_Y)); // setPiece(brick[0].getMesh(), Otter.MatrixOperations.opRotate(-45, Otter.MatrixOperations.AXIS.AX_X)); // return brick; // } //Not needed void brick2x2() { Otter.BasicLego[] brick = new Otter.BasicLego[4]; brick[0] = Instantiate(singlePrefab).GetComponentInChildren <Otter.BasicLego>(); brick[1] = Instantiate(singlePrefab).GetComponentInChildren <Otter.BasicLego>(); brick[2] = Instantiate(singlePrefab).GetComponentInChildren <Otter.BasicLego>(); brick[3] = Instantiate(singlePrefab).GetComponentInChildren <Otter.BasicLego>(); setPiece(brick[1].getMesh(), Otter.MatrixOperations.opTranslate(2, 0, 0)); setPiece(brick[2].getMesh(), Otter.MatrixOperations.opTranslate(0, 0, -2)); setPiece(brick[3].getMesh(), Otter.MatrixOperations.opTranslate(2, 0, -2)); }
Otter.BasicLego[] piecel3x1(GameObject piece) { Otter.BasicLego[] brick = new Otter.BasicLego[3]; brick[0] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); brick[1] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); brick[2] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); setPiece(brick[1].getMesh(), Otter.MatrixOperations.opTranslate(-2, 0, 0)); setPiece(brick[2].getMesh(), Otter.MatrixOperations.opTranslate(-4, 0, 0)); return(brick); }
Otter.BasicLego[] small2x8() { Otter.BasicLego[] brick = new Otter.BasicLego[16]; brick[0] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[1] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[2] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[3] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[4] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[5] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[6] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[7] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[8] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[9] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[10] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[11] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[12] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[13] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[14] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); brick[15] = Instantiate(singleSmallBrownPrefab).GetComponentInChildren <Otter.BasicLego>(); setPiece(brick[1].getMesh(), right); setPiece(brick[2].getMesh(), down); setPiece(brick[3].getMesh(), right); setPiece(brick[3].getMesh(), down); setPiece(brick[4].getMesh(), Otter.MatrixOperations.opTranslate(0, 0, -4)); setPiece(brick[5].getMesh(), Otter.MatrixOperations.opTranslate(2, 0, -4)); setPiece(brick[6].getMesh(), Otter.MatrixOperations.opTranslate(0, 0, -6)); setPiece(brick[7].getMesh(), Otter.MatrixOperations.opTranslate(2, 0, -6)); setPiece(brick[8].getMesh(), Otter.MatrixOperations.opTranslate(0, 0, -8)); setPiece(brick[9].getMesh(), Otter.MatrixOperations.opTranslate(2, 0, -8)); setPiece(brick[10].getMesh(), Otter.MatrixOperations.opTranslate(0, 0, -10)); setPiece(brick[11].getMesh(), Otter.MatrixOperations.opTranslate(2, 0, -10)); setPiece(brick[12].getMesh(), Otter.MatrixOperations.opTranslate(0, 0, -12)); setPiece(brick[13].getMesh(), Otter.MatrixOperations.opTranslate(2, 0, -12)); setPiece(brick[14].getMesh(), Otter.MatrixOperations.opTranslate(0, 0, -14)); setPiece(brick[15].getMesh(), Otter.MatrixOperations.opTranslate(2, 0, -14)); return(brick); }
Otter.BasicLego[] small2x4(GameObject piece) { Otter.BasicLego[] brick = new Otter.BasicLego[8]; brick[0] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); brick[1] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); brick[2] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); brick[3] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); brick[4] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); brick[5] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); brick[6] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); brick[7] = Instantiate(piece).GetComponentInChildren <Otter.BasicLego>(); setPiece(brick[1].getMesh(), Otter.MatrixOperations.opTranslate(0, 0, -2)); setPiece(brick[2].getMesh(), Otter.MatrixOperations.opTranslate(0, 0, -4)); setPiece(brick[3].getMesh(), Otter.MatrixOperations.opTranslate(0, 0, -6)); setPiece(brick[4].getMesh(), Otter.MatrixOperations.opTranslate(2, 0, 0)); setPiece(brick[5].getMesh(), Otter.MatrixOperations.opTranslate(2, 0, -2)); setPiece(brick[6].getMesh(), Otter.MatrixOperations.opTranslate(2, 0, -4)); setPiece(brick[7].getMesh(), Otter.MatrixOperations.opTranslate(2, 0, -6)); return(brick); }