@Test public void onDeath() { ItemEntity testIE = new ItemEntity(testItem); loadWorldWithPlayer(0, 0); testIE.setPosition(0f, 10f); world.addEntity(testIE); world.gameLoop(1); assert (world.getAllEntities().contains(testIE)); testIE.kill(null); world.gameLoop(1); assert (!world.getAllEntities().contains(testIE)); }
@Override protected void onDeath(Entity cause) { this.delete(); }
ItemEntity extends Entity { @Override protected void onDeath(Entity cause) { this.delete(); } }
ItemEntity extends Entity { @Override protected void onDeath(Entity cause) { this.delete(); } ItemEntity(Item item);  ItemEntity(Item item, float width, float height); }
ItemEntity extends Entity { @Override protected void onDeath(Entity cause) { this.delete(); } ItemEntity(Item item);  ItemEntity(Item item, float width, float height); long getRemoveDelay(); Item getItem(); void setRemoveDelay(long d); void setPermanent(boolean permanent); }
ItemEntity extends Entity { @Override protected void onDeath(Entity cause) { this.delete(); } ItemEntity(Item item);  ItemEntity(Item item, float width, float height); long getRemoveDelay(); Item getItem(); void setRemoveDelay(long d); void setPermanent(boolean permanent);  }