@Test public void testUpdate () { TestWorld world = new TestWorld(); Entity e = world.create(true).add(world.comp); world.update(null); assertEquals(1, world.sys.entitiesUpdated); }
public Entity add (Component comp) { checkDisposed("Cannot add components to disposed entity."); comp.add(this); queueChange(); return this; }
Entity implements Closeable { public Entity add (Component comp) { checkDisposed("Cannot add components to disposed entity."); comp.add(this); queueChange(); return this; } }
Entity implements Closeable { public Entity add (Component comp) { checkDisposed("Cannot add components to disposed entity."); comp.add(this); queueChange(); return this; } Entity(World world, int id); }
Entity implements Closeable { public Entity add (Component comp) { checkDisposed("Cannot add components to disposed entity."); comp.add(this); queueChange(); return this; } Entity(World world, int id); boolean isDisposed(); boolean isEnabled(); void setEnabled(boolean enabled); boolean has(Component comp); Entity add(Component comp); Entity add(Component c1, Component c2, Component... rest); Entity add(Component[] comps); Entity remove(Component comp); void dispose(); @Override void close(); void didChange(); @Override String toString(); }
Entity implements Closeable { public Entity add (Component comp) { checkDisposed("Cannot add components to disposed entity."); comp.add(this); queueChange(); return this; } Entity(World world, int id); boolean isDisposed(); boolean isEnabled(); void setEnabled(boolean enabled); boolean has(Component comp); Entity add(Component comp); Entity add(Component c1, Component c2, Component... rest); Entity add(Component[] comps); Entity remove(Component comp); void dispose(); @Override void close(); void didChange(); @Override String toString(); final World world; final int id; }