Package com.threerings.media.util

Examples of com.threerings.media.util.LinePath


    {
        // fly each sprite over, removing it from the hand immediately and from the board when it
        // finishes its path
        for (CardSprite card : cards) {
            removeFromHand(card);
            LinePath flight = new LinePath(dest, flightDuration);
            card.addSpriteObserver(_pathEndRemover);
            card.moveAndFadeOut(flight, flightDuration, fadePortion);
        }

        // adjust the hand to cover the hole
View Full Code Here


            // create a path sequence containing flight, pause, and drop
            ArrayList<Path> paths = Lists.newArrayList();
            Point hp2 = new Point(getHandX(size, idx), _handLocation.y),
                hp1 = new Point(hp2.x, hp2.y - _selectedCardOffset);
            paths.add(new LinePath(hp1, flightDuration));
            paths.add(new LinePath(hp1, pauseDuration));
            paths.add(new LinePath(hp2, dropDuration));
            sprite.moveAndFadeIn(new PathSequence(paths), flightDuration +
                                     pauseDuration + dropDuration, fadePortion);
        }
    }
View Full Code Here

            addSprite(cs);

            // prepend an initial delay to all cards after the first
            Path path;
            long pathDuration;
            LinePath flight = new LinePath(dest, flightDuration);
            if (ii > 0) {
                long delayDuration = cardDelay * ii;
                LinePath delay = new LinePath(src, delayDuration);
                path = new PathSequence(delay, flight);
                pathDuration = delayDuration + flightDuration;

            } else {
                path = flight;
View Full Code Here

     * @param flightDuration the duration of the card's flight
     */
    public void flyFromHandToBoard (CardSprite card, Point dest, long flightDuration)
    {
        // fly it over
        LinePath flight = new LinePath(dest, flightDuration);
        card.move(flight);

        // lower the board so that the card from hand is on top
        lowerBoardSprites(card.getRenderOrder() - 1);

View Full Code Here

        cs.setLocation(src.x, src.y);
        addSprite(cs);
        _boardSprites.add(cs);

        // and fly it over
        LinePath flight = new LinePath(dest, flightDuration);
        cs.moveAndFadeIn(flight, flightDuration, fadePortion);
    }
View Full Code Here

     */
    public void flyFromBoard (CardSprite[] cards, Point dest, long flightDuration,
                              float fadePortion)
    {
        for (CardSprite card : cards) {
            LinePath flight = new LinePath(dest, flightDuration);
            card.addSpriteObserver(_pathEndRemover);
            card.moveAndFadeOut(flight, flightDuration, fadePortion);
            _boardSprites.remove(card);
        }
    }
View Full Code Here

    public void flyFromBoard (CardSprite[] cards, Point dest1, Point dest2, long flightDuration,
                              float fadePortion)
    {
        for (CardSprite card : cards) {
            PathSequence flight = new PathSequence(
                new LinePath(dest1, flightDuration/2),
                new LinePath(dest1, dest2, flightDuration/2));
            card.addSpriteObserver(_pathEndRemover);
            card.moveAndFadeOut(flight, flightDuration, fadePortion);
            _boardSprites.remove(card);
        }
    }
View Full Code Here

                continue;
            }
            if (updateLayers) {
                cs.setRenderOrder(ii);
            }
            LinePath adjust = new LinePath(
                new Point(getHandX(size, ii), _handLocation.y), adjustDuration);
            cs.move(adjust);
        }
    }
View Full Code Here

                }
                pieceArrived(when, sprite, tx, ty);
            }
        });
        _actionSprites.add(piece);
        piece.move(new LinePath(start, end, duration));
    }
View Full Code Here

TOP

Related Classes of com.threerings.media.util.LinePath

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.