daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public long lastShotTime;
  2.  
  3.     public void searchAndDestroy(ArrayList<Attacker> attackers, Player p) {
  4.         ArrayList<Attacker> newattackers = attackers;
  5.        
  6.         for(Attacker a : newattackers) {
  7.             if(area.contains(a.getX(), a.getY())) {
  8.                 if(a.getHP() > 0) {
  9.                     if(System.currentTimeMillis() - lastShotTime > speed) {
  10.                         a.getHit(this.damage, this);
  11.                         lastShotTime = System.currentTimeMillis();
  12.                         if(a.getHP() <= 0) {
  13.                             toberemoved.add(a);
  14.                         }
  15.                     }
  16.                 }
  17.             }
  18.         }
  19.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top