Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(game.triggerFlags.containsKey(this.linked) && game.triggerFlags.get(this.linked) == 1f){
- this.charge += delta;
- anim += delta;
- if (anim > spd) {
- anim = 0;
- if (this.frameX < 3) {
- this.frameX++;
- }
- else {
- this.arc = true;
- this.frameX = 1;
- }
- }
- if (this.arc) {
- for (int i = 0; i < game.entities.size; i++) {
- Entity e = game.entities.get(i);
- if (!e.theBlackSpot) {
- if (e instanceof ArcRod && e.getEntityId() != this.getEntityId() && ((ArcRod)e).getType() != 0) {
- System.out.println("Foundarc"+Float.toString(anim));
- if (pos.dst(new Vector2(e.bound.x + e.bound.width/2, e.bound.y +e .bound.height/2)) <= arcDist) {
- if (anim >= spd) {
- Lightning.Arc(game, this, e, delta);
- //charge -= delta;
- }
- }
- }
- else if (e instanceof Actor) {
- System.out.println("Foundactor"+Float.toString(anim));
- if (pos.dst(new Vector2(e.bound.x + e.bound.width/2, e.bound.y +e .bound.height/2)) <= arcDist/5) {
- if (anim >= spd) {
- Lightning.Arc(game, this, e, delta);
- charge -= delta;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement