コード例 #1
0
  private void fire() {
    municion--;
    BulletActor bullet = new BulletActor(stage, this, 250);
    float x = getX() - 8 + getWidth() / 2;
    float y = getY() + getHeight() - 10;

    bullet.setPosition(x, y);
    stage.addActor(bullet);

    bullets.add(bullet);
    if (GameplayScreen.isSonidoEfectos())
      AlienChase.MANAGER.get("sound/shoot.ogg", Sound.class).play();
  }