Beispiel #1
0
  public boolean fire() {

    if (lastFired > fireRate) {
      SOUNDS.FIRE_GUN.play();
      Bullet b = new Bullet();
      b.setTeam(this.getTeam());
      Gamestate.getInstance().addObject(b);
      b.fire(new Vector3f(this.turret.getPos()), new Vector2f(turret.getDir()));

      lastFired = 0;
      return true;
    }
    return false;
  }
Beispiel #2
0
 public Vector2f getLookDir() {
   return turret.getDir();
 }