Package rectangles

Examples of rectangles.SpikePitRectangle


    for (int i = 0; i < obstacleList.size(); i++) {
      Obstacle p = obstacleList.get(i);
      if (p instanceof SpikePit) {// for instance of SpikePit
        SpikePit sp = (SpikePit) p;
        SpikePitRectangle spRect = sp.getRectangle();
        g.drawImage(spRect.getImage(), spRect.xCoord(),
            spRect.yCoord(), null);
      }
    }

    for (Item p : itemList) {
      if (p instanceof SpeedBoost) {
View Full Code Here


   
    for (int i = 0; i < model.getObstacles().size(); i++) {
      Obstacle p = model.getObstacles().get(i);
      if (p instanceof SpikePit) {// for instance of SpikePit
        SpikePit sp = (SpikePit) p;
        SpikePitRectangle spRect = sp.getRectangle();
        g.drawImage(spRect.getImage(), spRect.xCoord(),
            spRect.yCoord(), null);
      }
      if (p instanceof Crate) {// for instance of crate
        Crate c = (Crate) p;
        CrateRectangle cRect = c.getRectangle();
        g.drawImage(cRect.getImage(), cRect.xCoord(), cRect.yCoord(),
View Full Code Here

        }
       
      }
      if (p instanceof SpikePit) {// for instance of SpikePit
        SpikePit sp = (SpikePit) p;
        SpikePitRectangle tRect = sp.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
      if (p instanceof FireRing) {// for instance of fireRing
        FireRing fr = (FireRing) p;
        FireRingRectangle tRect = fr.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
      if (p instanceof TNT) {// for instance of TNT
        TNT tnt = (TNT) p;
        TNTRectangle tRect = tnt.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
View Full Code Here

        }
       
      }
      if (p instanceof SpikePit) {// for instance of SpikePit
        SpikePit sp = (SpikePit) p;
        SpikePitRectangle tRect = sp.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
      if (p instanceof FireRing) {// for instance of fireRing
        FireRing fr = (FireRing) p;
        FireRingRectangle tRect = fr.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
      if (p instanceof TNT) {// for instance of TNT
        TNT tnt = (TNT) p;
        TNTRectangle tRect = tnt.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
View Full Code Here

        }
       
      }
      if (p instanceof SpikePit) {// for instance of SpikePit
        SpikePit sp = (SpikePit) p;
        SpikePitRectangle tRect = sp.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
      if (p instanceof FireRing) {// for instance of fireRing
        FireRing fr = (FireRing) p;
        FireRingRectangle tRect = fr.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
      if (p instanceof TNT) {// for instance of TNT
        TNT tnt = (TNT) p;
        TNTRectangle tRect = tnt.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
View Full Code Here

  public SpikePit(Point p, Map map) {
    this.map = map;
    location = p;
    health = -1;// spike pit can't be destroyed
    // 25 is to offset for the size so it's not off the field
    rect = new SpikePitRectangle(location.col - 25, location.row - 25);

  }
View Full Code Here

    for (int i = 0; i < obstacleList.size(); i++) {
      Obstacle p = obstacleList.get(i);
      if (p instanceof SpikePit) {// for instance of SpikePit
        SpikePit sp = (SpikePit) p;
        SpikePitRectangle spRect = sp.getRectangle();
        g.drawImage(spRect.getImage(), spRect.xCoord(),
            spRect.yCoord(), null);
      }
    }

    for (Item p : itemList) {
      if (p instanceof SpeedBoost) {
View Full Code Here

  public SpikePit(Point p, Map map) {
    this.map = map;
    location = p;
    health = -1;// spike pit can't be destroyed
    // 25 is to offset for the size so it's not off the field
    rect = new SpikePitRectangle(location.col - 25, location.row - 25);

  }
View Full Code Here

        }
       
      }
      if (p instanceof SpikePit) {// for instance of SpikePit
        SpikePit sp = (SpikePit) p;
        SpikePitRectangle tRect = sp.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
      if (p instanceof FireRing) {// for instance of fireRing
        FireRing fr = (FireRing) p;
        FireRingRectangle tRect = fr.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
      if (p instanceof TNT) {// for instance of TNT
        TNT tnt = (TNT) p;
        TNTRectangle tRect = tnt.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
View Full Code Here

        }
       
      }
      if (p instanceof SpikePit) {// for instance of SpikePit
        SpikePit sp = (SpikePit) p;
        SpikePitRectangle tRect = sp.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
      if (p instanceof FireRing) {// for instance of fireRing
        FireRing fr = (FireRing) p;
        FireRingRectangle tRect = fr.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
      if (p instanceof TNT) {// for instance of TNT
        TNT tnt = (TNT) p;
        TNTRectangle tRect = tnt.getRectangle();
        if(tRect.intersects(rect)) {
          return false;
        }
       
      }
View Full Code Here

TOP

Related Classes of rectangles.SpikePitRectangle

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.