Examples of Bullet


Examples of org.htmlparser.tags.Bullet

     */
    public PrototypicalNodeFactory registerTags ()
    {
        registerTag (new AppletTag ());
        registerTag (new BaseHrefTag ());
        registerTag (new Bullet ());
        registerTag (new BulletList ());
        registerTag (new DefinitionList ());
        registerTag (new DefinitionListBullet ());
        registerTag (new DoctypeTag ());
        registerTag (new FormTag ());
View Full Code Here

Examples of org.htmlparser.tags.Bullet

            2,
            nestedBulletLists.size()
        );
        BulletList firstList =
            (BulletList)nestedBulletLists.elementAt(0);
        Bullet firstBullet =
            (Bullet)firstList.childAt(0);
        Node firstNodeInFirstBullet =
            firstBullet.childAt(0);
        assertType(
            "first child in bullet",
            Text.class,
            firstNodeInFirstBullet
        );
View Full Code Here

Examples of org.htmlparser.tags.Bullet

    super(filter, MATCH_STRING, ENDERS, END_TAG_ENDERS, false);
    this.ulli = ulli;
  }

  public Tag createTag(TagData tagData, CompositeTagData compositeTagData) throws ParserException {
    return new Bullet(tagData, compositeTagData);
  }
View Full Code Here

Examples of org.htmlparser.tags.Bullet

    parseAndAssertNodeCount(1);

    NodeList nestedBulletLists = ((CompositeTag) node[0]).searchFor(BulletList.class);
    assertEquals("bullets in first list", 2, nestedBulletLists.size());
    BulletList firstList = (BulletList) nestedBulletLists.elementAt(0);
    Bullet firstBullet = (Bullet) firstList.childAt(0);
    Node firstNodeInFirstBullet = firstBullet.childAt(0);
    assertType("first child in bullet", StringNode.class, firstNodeInFirstBullet);
    assertStringEquals("expected text", "Energy supply\r\n" + " (Campbell)  ", firstNodeInFirstBullet
        .toPlainTextString());
  }
View Full Code Here

Examples of org.sfsoft.jfighter2dx.characters.Bullet

   * @param dt
   */
  private void updateShipBullets(float dt) {
   
    List<Bullet> bullets = ship.getBullets();
    Bullet bullet = null;
   
    for (int i = bullets.size() - 1; i >= 0; i--) {
     
      bullet = bullets.get(i);
      bullet.update(dt);
     
      // Si el proyectil sale de la pantalla se elimina
      if ((bullet.getX() < 0) || (bullet.getX() > SCREEN_WIDTH) || (bullet.getY() < 0) || (bullet.getY() > SCREEN_HEIGHT))
        bullets.remove(i);
    }
  }
View Full Code Here

Examples of org.sfsoft.jfighter2dx.characters.Bullet

   * @param dt
   * @throws SlickException
   */
  private void checkCollisions(float dt) {
   
    Bullet bullet = null;
    Enemy enemy = null;
    Powerup powerup = null;
    List<Bullet> bullets = ship.getBullets();
   
    // Comprueba si los proyectiles del personaje han alcanzado a algún enemigo
    for (int i = enemies.size - 1; i >= 0; i--) {
      enemy = enemies.get(i);
      for (int j = bullets.size() - 1; j >= 0; j--) {
        bullet = bullets.get(j);
       
        if (bullet.getRect().overlaps(enemy.getRect())) {
         
          // Si el enemigo no es meteorito ni bala enemiga se explosiona y se elimina
          if ((!enemy.getClass().getSimpleName().equals("Stone")) && (!enemy.getClass().getSimpleName().equals("ShooterBullet"))) {
           
            enemy.hit();
            if (enemy.getLives() == 0) {
              ship.addScore(enemy.getValue());
             
              Explosion explosion = new Explosion(enemy.getX() - Constants.ENEMY_WIDTH, enemy.getY());
              explosions.add(explosion);
              enemies.removeIndex(i);
             
              if (game.configurationManager.isSoundEnabled())
                ResourceManager.getSound("explosion").play();
            }
           
          }
          // Si se dispara contra la bala de un enemigo, el proyectil no desaparece
          // Si se dispara un misil, éste tampoco desaparece hasta que no llega al final de la pantalla,
          // aunque haya acertado a algún enemigo
          if ((!enemy.getClass().getSimpleName().equals("ShooterBullet")) &&
              (!bullet.getClass().getSimpleName().equals("Missile")))
            bullets.remove(j);
        }
      }
    }
   
View Full Code Here

Examples of robocode.Bullet

    if (Math.abs(gunToHeading) <= Rules.GUN_TURN_RATE_RADIANS) {
      // Enough time to turn gun to position
      // TODO Take my position into account
      turnRight(robot, result.getFireDirection());
      if (robot.getGunHeat() == 0 && result.getFirePower() > 0) {
        Bullet bullet = robot.setFireBullet(result.getFirePower());
        this.bulletFired(robot, bullet);
      }
    } else {
      // Just turn gun as much as possible
      if ((Math.abs(gunToHeading) < Math.PI && gunToHeading >= 0)
View Full Code Here

Examples of robocode.Bullet

*/
public class BadFirePower extends AdvancedRobot {

  public void run() {
    while (true) {
      Bullet bullet = setFireBullet(getTime() - 12.0);

      if (bullet != null) {
        out.println(getTime() + " Bullet power: " + bullet.getPower());
      } else {
        out.println(getTime() + " No bullet");
      }
      execute();
    }
View Full Code Here

Examples of ru.vagrant_ai.questionmarkgame.obj.proj.Bullet

          LightningProjectile lightning_shot = new LightningProjectile(gun_point);
          bullet_array.add(lightning_shot);
        }
        else
        {
          Bullet bullet = new Bullet(gun_point);
          bullet_array.add(bullet);
        }
        Particle.addNew(PT.GUNSMOKE, (int)vector_mouse.getTheta(), gun_point.getX(), gun_point.getY()-3);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.