Esempio 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;
 }
Esempio n. 2
0
 public void forceStop() {
   if (action == null) return;
   action.stop(player);
   action = null;
 }
Esempio n. 3
0
 public boolean setSkill(Action skill) {
   forceStop();
   if (!skill.start(player)) return false;
   this.action = skill;
   return true;
 }