Esempio n. 1
0
        PieceController GenerateGhostController(Coord coord, Piece newPiece)
        {
            var gameObject = pieceGenerator.NewStandardPiece(newPiece, true);
            var pc         = gameObject.GetComponent <PieceController>();

            layout.PositionPieceAboveBoard(pc, coord);
            return(pc);
        }
Esempio n. 2
0
 void SetCursor(Piece piece)
 {
     if (cursorPiece == null)
     {
         cursorPiece = pieceGenerator.NewStandardPiece(piece, true);
         cursorPiece.transform.parent = controller.piecesParent;
         cursorPiece.name             = "EditorCursor";
     }
     else
     {
         cursorPiece.piece = piece;
         pieceGenerator.ReapplyMaterial(cursorPiece);
     }
     cursorPiece.gameObject.SetActive(editing);
 }
Esempio n. 3
0
        PieceController GeneratePiece(PieceType type)
        {
            var piece = new Piece(type, 1);

            return(pieceGen.NewStandardPiece(piece));
        }
Esempio n. 4
0
 PieceController GenerateNewPiece(Piece piece, Coord coord, Texture image = null)
 {
     return((image == null) ?
            pieceGenerator.NewStandardPiece(piece) :
            pieceGenerator.NewTexturedPiece(piece, coord, image, Size));
 }