Esempio n. 1
0
  public Crew getCrew(String name) {
    for (Crew member : crew) {
      if (member.getName().equals(name)) {
        return member;
      }
    }

    return null;
  }
Esempio n. 2
0
  public void update(double dt) {
    ShipUpdateEvent event = new ShipUpdateEvent(this, dt);
    EVENT_BUS.post(event);

    for (AbstractShipSystem system : systems.values()) {
      if (system != null) system.update(dt);
    }

    for (Crew crewMember : crew) {
      crewMember.update(dt);
    }

    for (int i = 0; i < crew.size(); i++) {
      if (crew.get(i).isDead()) {
        crew.get(i).remove();
        crew.remove(i);
        i--;
      }
    }

    this.chargeFtlDrive(dt);
  }