Guest User

Untitled

a guest
Apr 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public class DrawingSystem extends System {
  2.  
  3. public DrawingSystem(List<Entity> entityList) {
  4. super(entityList);
  5. }
  6.  
  7. public void update(Batch batch) {
  8. for (Entity entity : entityList) {
  9. removeIfNeccesarry(entity);
  10. //code
  11.  
  12. }
  13. }
  14.  
  15. public void removeIfNeccesarry(Entity entity){
  16. if(entity.toRemove){
  17. entityList.remove(entity);
  18. }
  19. }
  20.  
  21. }
Add Comment
Please, Sign In to add comment