Package com.ackgaming.entity.items

Examples of com.ackgaming.entity.items.BonusLifeItem


      g.drawString("Level: " + lev, 240, 430);
      g.drawString("Lives: " + lives, 420, 430);
     
      for(int i=0; i<drops.size(); i++) {
        if(drops.get(i) instanceof BonusLifeItem) {
          BonusLifeItem t = (BonusLifeItem) drops.get(i);
            t.draw();
        }
      }
     
      for(int i=0; i<bullets.size(); i++) {
        Bullet b = (Bullet) bullets.get(i);
View Full Code Here


      if(paused || delayed) {
        ball.stop();
        paddle.stop();
        for(int i=0; i<drops.size(); i++) {
          if(drops.get(i) instanceof BonusLifeItem) {
            BonusLifeItem t = (BonusLifeItem) drops.get(i);
            t.stop();
          }
        }
      }
     
     
      paddle.update();
      ball.update();
     
     
      checkColision();
        for(int i=0; i<drops.size(); i++) {
          if(drops.get(i) instanceof BonusLifeItem) {
            BonusLifeItem t = (BonusLifeItem) drops.get(i);
            t.update();
          }
        }
       
      for(int i=0; i<bullets.size(); i++) {
          Bullet b = (Bullet) bullets.get(i);
View Full Code Here

                  if(b.timesHit == 2) {
                    //lives++;
                    blocks.remove(i);
                    b.setDestroyed();
                    b.setVisible(false);
                    drops.add(new BonusLifeItem(bonusLifeItemImg, blockX, blockY));
                  } else score += 10;
          }
        }
      }
     
      for(int i=0; i<drops.size(); i++) {
      if(drops.get(i) instanceof BonusLifeItem) {
        BonusLifeItem t = (BonusLifeItem) drops.get(i);
        if(paddle.getRect().intersects(t.getRect())) {
          lives++;
          drops.remove(i);
        }
      }
    }
View Full Code Here

TOP

Related Classes of com.ackgaming.entity.items.BonusLifeItem

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.