Exemplo n.º 1
0
 @Override
 public void setActivate(boolean activate, boolean forceAdjust) {
   if (activate) {
     if (!activate() && (available() || forceAdjust)) {
       if (owner().distance(target()) < CAST_RANGE) {
         super.setActivate(true, forceAdjust);
         setTarget(owner().target());
         setPosition(target().position().clone());
         targetPreviousPosition = target().position().clone();
         schedule();
         setStartTime(Clocks.masterClock.currentTime());
         Audio.playSound(Audio.BOUND_OF_FREEDOM);
       }
     }
   } else {
     clearTask();
     super.setActivate(false, forceAdjust);
   }
 }
Exemplo n.º 2
0
 @Override
 protected void schedule() {
   setTimerID(Clocks.masterClock.scheduleFixedRate(this, UNIT_TIME, TimeUnit.MILLISECONDS));
   Audio.playSound(Audio.SOUL_DIVE);
 }