Esempio n. 1
0
  @Override
  public void render(GameContainer gc, Graphics g) {

    for (ILevelEntity e : mLevelEntities) {
      e.render(gc, g);
    }
  }
Esempio n. 2
0
 public List<Intersection> getIntersectionsWith(LineSegment ls) {
   List<Intersection> intersections = new ArrayList<Intersection>();
   for (ILevelEntity e : mLevelEntities) {
     for (Intersection i : e.getIntersectionsWith(ls)) {
       if (i != null) intersections.add(i);
     }
   }
   return intersections;
 }
Esempio n. 3
0
  @Override
  public void update(GameContainer gc, double timeElapsed) {

    for (ILevelEntity e : mEntitiesToRemove) {
      mLevelEntities.remove(e);
    }
    for (ILevelEntity e : mEntitiesToAdd) {
      mLevelEntities.add(e);
    }
    mEntitiesToAdd.clear();
    System.out.println("Entities: " + mLevelEntities.size());

    for (ILevelEntity e : mLevelEntities) {
      e.update(gc, timeElapsed);
    }
  }