Package squidpony.squidgrid.gui.animation

Examples of squidpony.squidgrid.gui.animation.Animation


     * @param direction
     */
    public void bump(Point location, Point direction) {
        if (contents[location.x][location.y] != null) {
            int duration = 20;
            Animation anim = new BumpAnimation(contents[location.x][location.y], new Point(location.x * cellWidth, location.y * cellHeight), new Dimension(cellWidth / 3, cellHeight / 3), direction, duration);
            contents[location.x][location.y] = null;
            imageChanged[location.x][location.y] = true;
            redraw();
            animations.add(anim);
            if (animationManager == null) {
View Full Code Here


     * @param end
     * @param duration
     */
    public void slide(Point start, Point end, int duration) {
        if (contents[start.x][start.y] != null) {
            Animation anim = new SlideAnimation(contents[start.x][start.y], new Point(start.x * cellWidth, start.y * cellHeight), new Point(end.x * cellWidth, end.y * cellHeight), duration);
            contents[start.x][start.y] = null;
            imageChanged[start.x][start.y] = true;
            redraw();
            animations.add(anim);
            if (animationManager == null) {
View Full Code Here

     *
     * @param location
     */
    public void wiggle(Point location) {
        if (contents[location.x][location.y] != null) {
            Animation anim = new WiggleAnimation(contents[location.x][location.y], new Point(location.x * cellWidth, location.y * cellHeight), 0.3, new Point(cellWidth / 4, cellHeight / 4), 160);
            contents[location.x][location.y] = null;
            imageChanged[location.x][location.y] = true;
            redraw();
            animations.add(anim);
            if (animationManager == null) {
View Full Code Here

TOP

Related Classes of squidpony.squidgrid.gui.animation.Animation

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.