Package com.l2client.animsystem.example

Source Code of com.l2client.animsystem.example.DieAction

package com.l2client.animsystem.example;

import com.l2client.animsystem.Action;
import com.l2client.animsystem.Animation;
import com.l2client.animsystem.Mediator;
import com.l2client.animsystem.Channel.Channels;

public class DieAction extends Action {

  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;
  }
}
TOP

Related Classes of com.l2client.animsystem.example.DieAction

TOP
Copyright © 2018 www.massapi.com. 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.