JumpTo.java :  » UnTagged » quiniandroid » org » cocos2d » actions » interval » Android Open Source

Android Open Source » UnTagged » quiniandroid 
quiniandroid » org » cocos2d » actions » interval » JumpTo.java
package org.cocos2d.actions.interval;

import org.cocos2d.nodes.CocosNode;

//
// JumpTo
//

public class JumpTo extends JumpBy {

    public static JumpTo action(float time, float x, float y, float height, int jumps) {
        return new JumpTo(time, x, y, height, jumps);
    }

    protected JumpTo(float time, float x, float y, float height, int jumps) {
        super(time, x, y, height, jumps);
    }

    @Override
    public IntervalAction copy() {
        return new JumpTo(duration, delta.x, delta.y, height, jumps);
    }

    @Override
    public void start(CocosNode aTarget) {
        super.start(aTarget);
        delta.x -= startPosition.x;
        delta.y -= startPosition.y;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.