Ejemplo n.º 1
0
 public void process() {
   if (action != null) {
     if (player.isDead()) {
       forceStop();
     } else if (!action.process(player)) {
       forceStop();
     }
   }
   if (actionDelay > 0) {
     actionDelay--;
     return;
   }
   if (action == null) return;
   int delay = action.processWithDelay(player);
   if (delay == -1) {
     forceStop();
     return;
   }
   actionDelay += delay;
 }
Ejemplo n.º 2
0
 public void forceStop() {
   if (action == null) return;
   action.stop(player);
   action = null;
 }
Ejemplo n.º 3
0
 public boolean setSkill(Action skill) {
   forceStop();
   if (!skill.start(player)) return false;
   this.action = skill;
   return true;
 }