Package rectangles

Examples of rectangles.ProjectileRectangle


        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

      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

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.