Class Entity

java.lang.Object
com.github.elebras1.flecs.Entity
Direct Known Subclasses:
EntityView

public class Entity extends Object
  • Method Details

    • setWorld

      protected void setWorld(World world)
    • setId

      protected void setId(long id)
    • id

      public long id()
    • world

      public World world()
    • add

      public Entity add(long componentId)
    • add

      public Entity add(Entity component)
    • remove

      public Entity remove(long componentId)
    • remove

      public Entity remove(Entity component)
    • remove

      public <T> Entity remove(Class<T> componentClass)
    • has

      public boolean has(long componentId)
    • has

      public boolean has(Class<?> componentClass)
    • has

      public boolean has(Entity component)
    • setName

      public Entity setName(String name)
    • getName

      public String getName()
    • destruct

      public void destruct()
    • isValid

      public boolean isValid()
    • isAlive

      public boolean isAlive()
    • clear

      public void clear()
    • addRelation

      public Entity addRelation(long relation, long target)
    • childOf

      public Entity childOf(long parentId)
    • childOf

      public Entity childOf(Entity parent)
    • parent

      public Entity parent()
    • isA

      public Entity isA(long entityId)
    • removeRelation

      public Entity removeRelation(long relation, long target)
    • hasRelation

      public boolean hasRelation(long relation, long target)
    • removeRelation

      public Entity removeRelation(long relation)
    • hasRelation

      public boolean hasRelation(long relation)
    • set

      public <T> Entity set(T data)
    • set

      public <T> Entity set(T data, long target)
    • get

      public <T> T get(long componentId)
    • get

      public <T> T get(Class<T> componentClass)
    • get

      public <T> T get(Class<T> componentClass, long target)
    • getMutView

      public <T extends ComponentView> T getMutView(Class<?> componentClass)
    • getMutView

      public <T> T getMutView(Class<?> componentClass, long target)
    • enable

      public void enable()
    • disable

      public void disable()
    • observe

      public FlecsObserver observe(long eventId, Runnable callback)
    • observe

      public <T> FlecsObserver observe(Class<T> eventClass, Consumer<T> callback)
    • emit

      public void emit(long eventId)
    • emit

      public void emit(long eventId, long componentId)
    • emit

      public <T> void emit(long eventId, Class<T> componentClass)
    • target

      public long target(long relationId)
    • target

      public long target(long relationId, int index)
    • depth

      public int depth(long relationId)
    • owns

      public boolean owns(long componentId)
    • owns

      public boolean owns(Class<?> componentClass)
    • enabled

      public boolean enabled(long componentId)
    • enabled

      public <T> boolean enabled(Class<T> componentClass)
    • enable

      public Entity enable(long componentId)
    • enable

      public <T> Entity enable(Class<T> componentClass)
    • disable

      public Entity disable(long componentId)
    • disable

      public <T> Entity disable(Class<T> componentClass)
    • clone

      public Entity clone(boolean cloneValues)
    • lookup

      public Entity lookup(String path)
    • children

      public void children(Consumer<Entity> callback)
    • children

      public void children(long relationId, Consumer<Entity> callback)
    • table

      public Table table()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object