Пример #1
0
 public void Process() {
   if (clockBullet.getElapsedTime().asMilliseconds() > 500 && isEnabled()) {
     guns.get(0).fireBullet(200, getX(), getY() + 20);
     guns.get(1).fireBullet(150, getX() + 20, getY() + 20);
     clockBullet.restart();
   }
 }
Пример #2
0
  public shootingItem(Texture itemTex, Map map) {
    super(itemTex);
    guns = new HashMap<Integer, Gun>();
    guns.put(0, new Gun(map, false, "Yellow", 3));
    guns.put(1, new Gun(map, false, "Yellow", 3));

    clockBullet = new Clock();
  }
Пример #3
0
 public Gun getGun(int gunNo) {
   return guns.get(gunNo);
 }