Package rectangles

Examples of rectangles.ProjectileRectangle


      g.drawImage(p.getImage(), tRect.xCoord(), tRect.yCoord(), null);
    }
    for (Projectile p : projectileList) {
      if (p instanceof PlayerProjectile) {
        PlayerProjectile s = (PlayerProjectile) p;
        ProjectileRectangle rect = s.getRectangle();
        g.drawImage(rect.getImage(), rect.xCoord(), rect.yCoord(), null);
      }
      if (p instanceof EnemyProjectile) {
        EnemyProjectile s = (EnemyProjectile) p;
        ProjectileRectangle rect = s.getRectangle();
        g.drawImage(rect.getImage(), rect.xCoord(), rect.yCoord(), null);
      }
    }
    for (Explosion p : explosionList) {
      g.drawImage(p.getImage(), p.getLocation().col, p.getLocation().row,
          null);
View Full Code Here


    }

    for (Projectile p : projectileList) {
      if (p instanceof PlayerProjectile) {
        PlayerProjectile s = (PlayerProjectile) p;
        ProjectileRectangle rect = s.getRectangle();
        g.drawImage(rect.getImage(), rect.xCoord(), rect.yCoord(), null);
      }
      if (p instanceof EnemyProjectile) {
        EnemyProjectile s = (EnemyProjectile) p;
        ProjectileRectangle rect = s.getRectangle();
        g.drawImage(rect.getImage(), rect.xCoord(), rect.yCoord(), null);
      }
    }
    for(int i = 0; i < model.getMap().getExplosions().size(); i++) {
      Explosion e = model.getMap().getExplosions().get(i);
      g.drawImage(e.getImage(), e.getLocation().col, e.getLocation().row, null);
View Full Code Here

    this.tank = t;// setting tank
    this.map = map;// setting map
    speed = 20;// setting speed
    this.xspeed = x;// setting speed in x direction
    this.yspeed = y;// setting speed in the y direction
    rect = new ProjectileRectangle(p.col - 3, p.row - 3);// creating new
                                // projectile
                                // rectangle
    exists = true;// saying it is on the field now
    thisMissle = this;
    Thread pt = new ProjectileThread();// creating new thread for the //
View Full Code Here

   */
  public void exists() {
    if (p.row <= 15 || p.row >= 665 || p.col <= 15 || p.col >= 975
        || map.isOver()) {
      p = new Point(-1, -1);
      rect = new ProjectileRectangle(-100, -100);
      exists = false;

    }
  }
View Full Code Here

        int y = p.row;
        x = x + xspeed;// incrementing location of new point!!!
        y = y + yspeed;

        p = new Point(y, x);// new calculated point
        rect = new ProjectileRectangle(p.col - 3, p.row - 3);// new
                                    // projectile
                                    // rectangle
                                    // at
                                    // new
                                    // location
View Full Code Here

    this.p = p;
    speed = 20;
    this.map = map;
    this.xspeed = x;
    this.yspeed = y;
    rect = new ProjectileRectangle(p.col - 3, p.row - 3);// creating new
                                // projectile
                                // rectangle
    exists = true;
    tank = t;
View Full Code Here

   */
  public void exists() {
    if (p.row <= 15 || p.row >= 665 || p.col <= 15 || p.col >= 975
        || map.isOver()) {
      p = new Point(-1, -1);
      rect = new ProjectileRectangle(-100, -100);
      exists = false;

    }
  }
View Full Code Here

        int y = p.row;
        x = x + xspeed;// incrementing location of new point!!!
        y = y + yspeed;

        p = new Point(y, x);// new calculated point
        rect = new ProjectileRectangle(p.col - 3, p.row - 3);
       
        exists();
        try {
          notifyObservers(thisMissle);
          setChanged();
View Full Code Here

    this.tank = t;// setting tank
    this.map = map;// setting map
    speed = 20;// setting speed
    this.xspeed = x;// setting speed in x direction
    this.yspeed = y;// setting speed in the y direction
    rect = new ProjectileRectangle(p.col - 3, p.row - 3);// creating new
                                // projectile
                                // rectangle
    exists = true;// saying it is on the field now
    thisMissle = this;
    Thread pt = new ProjectileThread();// creating new thread for the //
View Full Code Here

   */
  public void exists() {
    if (p.row <= 15 || p.row >= 665 || p.col <= 15 || p.col >= 975
        || map.isOver()) {
      p = new Point(-1, -1);
      rect = new ProjectileRectangle(-100, -100);
      exists = false;

    }
  }
View Full Code Here

TOP

Related Classes of rectangles.ProjectileRectangle

Copyright © 2018 www.massapicom. 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.