Advertisement
acegiak

Untitled

Jun 25th, 2015
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.23 KB | None | 0 0
  1.         if(game.triggerFlags.containsKey(this.linked) && game.triggerFlags.get(this.linked) == 1f){
  2.                     this.charge += delta;
  3.                     anim += delta;
  4.                            
  5.                     if (anim > spd) {
  6.                         anim = 0;
  7.                         if (this.frameX < 3) {
  8.                             this.frameX++;
  9.                         }
  10.                         else {
  11.                             this.arc = true;
  12.                             this.frameX = 1;
  13.                         }
  14.                     }
  15.                    
  16.                     if (this.arc) {
  17.  
  18.                         for (int i = 0; i < game.entities.size; i++) {
  19.                             Entity e = game.entities.get(i);
  20.                             if (!e.theBlackSpot) {
  21.                                 if (e instanceof ArcRod && e.getEntityId() != this.getEntityId() && ((ArcRod)e).getType() != 0) {
  22.                                     System.out.println("Foundarc"+Float.toString(anim));
  23.                                     if (pos.dst(new Vector2(e.bound.x + e.bound.width/2, e.bound.y +e .bound.height/2)) <= arcDist) {
  24.                                         if (anim >= spd) {
  25.                                             Lightning.Arc(game, this, e, delta);
  26.                                             //charge -= delta;
  27.                                         }
  28.                                     }
  29.                                 }
  30.                                 else if (e instanceof Actor) {
  31.                                     System.out.println("Foundactor"+Float.toString(anim));
  32.                                     if (pos.dst(new Vector2(e.bound.x + e.bound.width/2, e.bound.y +e .bound.height/2)) <= arcDist/5) {
  33.                                         if (anim >= spd) {
  34.                                             Lightning.Arc(game, this, e, delta);
  35.                                             charge -= delta;
  36.                                         }
  37.                                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement