Exemple #1
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);
 }
Exemple #2
0
        void AnimateNewPiece(NewPieceAction action)
        {
            var piece = action.newPiece;
            var coord = action.coord;

            var pc = Game.Rules.HasIncomingQueue ?
                     IncomingPieceProvider(piece) :
                     GenerateNewPiece(piece, coord);

            if (piece.size != 1)
            {
                pieceGenerator.ReapplyMaterial(pc);
            }

            layout.AnimateIntoPosition(pc, coord, addPieceTime);
            Set(coord, pc);
        }