Class Entity

All Implemented Interfaces:
Lifecycle, Printable, ComponentFinder, EntityFinder

public class Entity extends EventDispatcher<EntityEvent> implements Lifecycle, Printable, EntityFinder, ComponentFinder
Represents a unique entity in the world with a list of components.
  • Field Details

    • id

      public final int id
    • tag

      public String tag
    • isActive

      protected boolean isActive
    • transform

      public final Transform transform
    • world

      protected final World world
    • application

      protected final Application application
    • logger

      protected final Logger logger
    • scene

      protected final Scene scene
    • components

      public final List<Component> components
      Components of this entity
  • Constructor Details

    • Entity

      public Entity(World world)
      Creates an entity at the position (0, 0)
    • Entity

      public Entity(World world, String name)
      Creates an entity at the position (0, 0)
    • Entity

      public Entity(World world, float x, float y)
      Creates an entity at the position (x, y)
    • Entity

      public Entity(World world, String name, float x, float y)
      Creates an entity at the position (x, y)
  • Method Details