Examples of recieveDamage()


Examples of battleTank.BubbleShield.recieveDamage()

          if (obs instanceof Crate) {
            Crate c = (Crate) obs;
            if (c.getRectangle().intersects(p.getRectangle())) {
              p.collided();
              projectileList.remove(p);
              c.recieveDamage(p.getDamage());
              notifyObservers(new Point(p.getLocation().row - 12, p.getLocation().col - 12));
              setChanged();
              break;
            }
          }
View Full Code Here

Examples of battleTank.BubbleShield.recieveDamage()

          if (obs instanceof TNT) {
            TNT c = (TNT) obs;
            if (c.getRectangle().intersects(p.getRectangle())) {
              p.collided();
              projectileList.remove(p);
              c.recieveDamage(p.getDamage());
              notifyObservers(new Point(p.getLocation().row - 12, p.getLocation().col - 12));
              setChanged();
              break;
            }
          }
View Full Code Here

Examples of battleTank.BubbleShield.recieveDamage()

          if (obs instanceof ImmovableBlock) {
            ImmovableBlock c = (ImmovableBlock) obs;
            if (c.getRectangle().intersects(p.getRectangle())) {
              p.collided();
              projectileList.remove(p);
              c.recieveDamage(p.getDamage());
              notifyObservers(new Point(p.getLocation().row - 12, p.getLocation().col - 12));
              setChanged();
              break;

            }
View Full Code Here

Examples of battleTank.BubbleShield.recieveDamage()

          if (obs instanceof FireRing) {
            FireRing c = (FireRing) obs;
            if (c.getRectangle().intersects(p.getRectangle())) {
              p.collided();
              projectileList.remove(p);
              c.recieveDamage(p.getDamage());
              notifyObservers(new Point(p.getLocation().row - 12, p.getLocation().col - 12));
              setChanged();
              break;

            }
View Full Code Here

Examples of battleTank.BubbleShield.recieveDamage()

            if (c.getRectangle().intersects(p.getRectangle())) {
              p.collided();
              projectileList.remove(p);
              notifyObservers(new Point(c.getLocation().row - 12, c.getLocation().col - 12));
              setChanged();
              c.recieveDamage(p.getDamage());
              break;
            }
          }
         
          // TNT's are destroyed when a projectile collides with them, they also create a blast radius
View Full Code Here

Examples of battleTank.BubbleShield.recieveDamage()

            if (c.getRectangle().intersects(p.getRectangle())) {
              p.collided();
              projectileList.remove(p);
              notifyObservers(new Point(c.getLocation().row - 12, c.getLocation().col - 12));
              setChanged();
              c.recieveDamage(p.getDamage());
              break;
            }
          }
         
          // ImmovableBlock's can not be destroyed. If a projectile collides with one, the projectile is removed.
View Full Code Here

Examples of battleTank.BubbleShield.recieveDamage()

          if (obs instanceof ImmovableBlock) {
            ImmovableBlock c = (ImmovableBlock) obs;
            if (c.getRectangle().intersects(p.getRectangle())) {
              p.collided();
              projectileList.remove(p);
              c.recieveDamage(p.getDamage());
              notifyObservers(new Point(p.getLocation().row - 12, p.getLocation().col - 12));
              setChanged();
              break;

            }
View Full Code Here

Examples of battleTank.BubbleShield.recieveDamage()

          if (obs instanceof FireRing) {
            FireRing c = (FireRing) obs;
            if (c.getRectangle().intersects(p.getRectangle())) {
              p.collided();
              projectileList.remove(p);
              c.recieveDamage(p.getDamage());
              notifyObservers(new Point(p.getLocation().row - 12, p.getLocation().col - 12));
              setChanged();
              break;

            }
View Full Code Here

Examples of battleTank.BubbleShield.recieveDamage()

      notifyObservers();
      setChanged();
        }
    if (o instanceof Crate) {
      Crate c = (Crate) o;
      c.recieveDamage(1);
    }

  }
  public LinkedList<Obstacle> getObstacles() {
    return obstacleList;
View Full Code Here

Examples of battleTank.Crate.recieveDamage()

          if (obs instanceof Crate) {
            Crate c = (Crate) obs;
            if (c.getRectangle().intersects(p.getRectangle())) {
              p.collided();
              projectileList.remove(p);
              c.recieveDamage(p.getDamage());
              notifyObservers(new Point(p.getLocation().row - 12, p.getLocation().col - 12));
              setChanged();
              break;
            }
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.