Package com.l2client.animsystem

Examples of com.l2client.animsystem.Animation


    }
    return null;
  }

  private Animation standingAnimationOutCombat(Mediator a, InputProvider in) {
    Animation ret = a.getAnimation();

    if (rand.nextInt(9) > 4) {
      // AnimationManager.get().getAnimation(assetName, path)
      ret.setName("stand_a_idle");
    } else {
      if (rand.nextInt(1) > 0) {
        ret.setName("stand_b_idle");
      } else {
        ret.setName("stand_c_idle");
      }
    }
    ret.setBlendTime(1f);
    return ret;
  }
View Full Code Here


    ret.setBlendTime(1f);
    return ret;
  }

  private Animation standingAnimationInCombat(Mediator a, InputProvider in) {
    Animation ret = a.getAnimation();

    if (Acting.Open.equals(in.getInput(Acting.class)))
      ret.setName(getReadyResult(in));
    else
      ret.setName("hide_idle");

    ret.setBlendTime(1f);
    return ret;
  }
View Full Code Here

*
*/
public class Taunt extends Action {
  @Override
  protected Animation evaluate(Mediator med) {
    Animation ret = null;
    if (!Direction.None.equals(med.getInput().getInput(Direction.class))) {
      if (med.forceLockCheck(Channels.AllChannels, 1)) {
        ret = med.getAnimation();
        ret.setChannel(med.getChannel(Channels.AllChannels));
        ret.setLevel(1);
        ret.setBlendTime(0.2f);
        ret.setLooping(false);
        ret.setName("taunt");
        return ret;
      }
    }
    return null;
  }
View Full Code Here

  public JumpAction() {
  }
 
  @Override
  protected Animation evaluate(Mediator med){
    Animation ret = null;
    if(med.forceLockCheck(Channels.AllChannels,1)){
      ret = med.getAnimation();
      ret.setLevel(1);
      ret.setChannel(med.getChannel(Channels.AllChannels));
      InputProvider in = med.getInput();
      switch(in.getInput(Target.class)){
      case Mid:  ret.setName("Jump");break;
      case High: ret.setName("HighJump");break;
      case Back: ret.setName("Backflip");break;
      default: ret.setName("JumpNoHeight");break;
      }
      ret.setBlendTime(0.2f);
    }
    return ret;
  }
View Full Code Here

  public DefaultAction() {
  }
 
  @Override
  protected Animation evaluate(Mediator med){
    Animation ret = null;
    InputProvider in = med.getInput();
    if(Movement.None.equals(in.getInput(Movement.class))){
      if(med.setLockCheck(Channels.AllChannels,1)){
        ret = med.getAnimation();
        if(rand.nextInt(9) > 5 ){
          ret.setName("Idle1");
        } else{
          if(rand.nextInt(1) > 0){
            ret.setName("Idle2");
          }else{
            ret.setName("Idle3");
          }
        }
        ret.setBlendTime(0.5f);
      }
    } else {
      if(med.setLockCheck(Channels.AllChannels,1)){
        ret = med.getAnimation();
        if(Acting.Hidden.equals(in.getInput(Acting.class))){
          ret.setName("Stealth");
          ret.setBlendTime(0.5f);
        } else {
          ret.setName("Walk");
          ret.setBlendTime(0.5f);
        }
      }
    }

    if(ret != null){
      ret.setChannel(med.getChannel(Channels.AllChannels));
      ret.setLevel(1);
    }

    return ret;
  }
View Full Code Here

  public ClimbAction() {
  }
 
  @Override
  protected Animation evaluate(Mediator med){
    Animation ret = null;
    if(med.setLockCheck(Channels.AllChannels,1)){
      ret = med.getAnimation();
      ret.setLevel(1);
      ret.setChannel(med.getChannel(Channels.AllChannels));
      ret.setName("Climb");
      ret.setBlendTime(1f);
    }
    return ret;
  }
View Full Code Here

  public DieAction() {
  }
 
  @Override
  protected Animation evaluate(Mediator med){
    Animation ret = null;
    if(med.setLockCheck(Channels.AllChannels,3)){
      ret = med.getAnimation();
      ret.setLevel(3);
      ret.setChannel(med.getChannel(Channels.AllChannels));
      if(rand.nextInt(1) > 0)
        ret.setName("Death1");
      else
        ret.setName("Death2");

      ret.setBlendTime(0f);
    }
    return ret;
  }
View Full Code Here

public class AttackAction extends Action {

  @Override
  protected Animation evaluate(Mediator med) {
    Animation ret = null;
    InputProvider in = med.getInput();
    if (AttackType.None.equals(in.getInput(AttackType.class))) {
      if (med.setLockCheck(Channels.AllChannels, 2)) {
        ret = med.getAnimation();
        ret.setLevel(2);
        ret.setChannel(med.getChannel(Channels.AllChannels));
        if (rand.nextInt(9) > 5) {
          ret.setName("Kick");
        } else {
          if (rand.nextInt(1) > 0) {
            ret.setName("SideKick");
          } else {
            ret.setName("Spin");
          }
        }
        ret.setBlendTime(0.5f);
      }
    } else {
      if (med.setLockCheck(Channels.AllChannels, 2)) {
        ret = med.getAnimation();
        ret.setLevel(2);
        ret.setChannel(med.getChannel(Channels.AllChannels));
        if (rand.nextInt(9) > 4) {
          ret.setName("Attack1");
        } else {
          if (rand.nextInt(1) > 0) {
            ret.setName("Attack2");
          } else {
            ret.setName("Attack3");
          }
          ret.setBlendTime(0.5f);
        }
      }
    }
    return ret;
  }
View Full Code Here

import com.l2client.animsystem.Channel.Channels;

public class BlockAction extends Action {
  @Override
  protected Animation evaluate(Mediator med){
    Animation ret = null;
    if(med.setLockCheck(Channels.AllChannels,2)){
      ret = med.getAnimation();
      ret.setLevel(2);
      ret.setChannel(med.getChannel(Channels.AllChannels));
      ret.setName("Block");
      ret.setBlendTime(0.2f);
    }
    return ret;
  }
View Full Code Here

  }

  @Override
  public Animation createAnimation() {
    // TODO Auto-generated method stub
    return new Animation(this) {
     
      @Override
      public Object getInternalAnimation() {
        //ok here as it is not needed
        return null;
View Full Code Here

TOP

Related Classes of com.l2client.animsystem.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.