Search in sources :

Example 1 with LifeMovement

use of server.movement.LifeMovement in project HeavenMS by ronancpl.

the class AbstractMovementPacketHandler method updatePosition.

protected void updatePosition(List<LifeMovementFragment> movement, AnimatedMapleMapObject target, int yoffset) {
    for (LifeMovementFragment move : movement) {
        if (move instanceof LifeMovement) {
            if (move instanceof AbsoluteLifeMovement) {
                Point position = ((LifeMovement) move).getPosition();
                position.y += yoffset;
                target.setPosition(position);
            }
            target.setStance(((LifeMovement) move).getNewstate());
        }
    }
}
Also used : LifeMovement(server.movement.LifeMovement) RelativeLifeMovement(server.movement.RelativeLifeMovement) AbsoluteLifeMovement(server.movement.AbsoluteLifeMovement) LifeMovementFragment(server.movement.LifeMovementFragment) Point(java.awt.Point) AbsoluteLifeMovement(server.movement.AbsoluteLifeMovement)

Aggregations

Point (java.awt.Point)1 AbsoluteLifeMovement (server.movement.AbsoluteLifeMovement)1 LifeMovement (server.movement.LifeMovement)1 LifeMovementFragment (server.movement.LifeMovementFragment)1 RelativeLifeMovement (server.movement.RelativeLifeMovement)1