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

    for (ILevelEntity e : mLevelEntities) {
      e.render(gc, g);
    }
  }
Ejemplo 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;
 }
Ejemplo 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);
    }
  }