Class EntityManager

java.lang.Object
com.tenio.common.logger.AbstractLogger
com.tenio.common.logger.SystemLogger
com.tenio.engine.fsm.EntityManager

public final class EntityManager extends com.tenio.common.logger.SystemLogger
This class for managing entities.
  • Constructor Details

    • EntityManager

      public EntityManager()
  • Method Details

    • register

      public void register(AbstractEntity entity)
      Register an entity to this management.
      Parameters:
      entity - the desired entity, see AbstractEntity
    • contain

      public boolean contain(String id)
    • count

      public long count()
    • get

      public AbstractEntity get(String id)
    • update

      public void update(float deltaTime)
      Need to call update every frame.
      Parameters:
      deltaTime - the time between two consecutive frames
    • gets

      public Map<String,AbstractEntity> gets()
      Retrieves the list of entities.
      Returns:
      the list of entities in this manager
    • remove

      public void remove(String id)
    • clear

      public void clear()