Class EntityManager


  • public final class EntityManager
    extends java.lang.Object
    Responsible for Managing the entity and component events. Entity's can be accessed by a String name
    • Constructor Summary

      Constructors 
      Constructor Description
      EntityManager()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addComponent​(Component c)
      Don't call manually
      static void addEntity​(Entity e)
      Don't call manually
      static void changeName​(java.lang.String prev, java.lang.String new_)
      changes the entity's name
      static void cleanUp()
      Cleans up all entities and components.
      static float getDeltaTime()
      gets the time between the last from and the current
      static void Initialize()
      Should only be called once although if it isn't called at all it will be called automatically
      static void raiseEvents​(ComponentEvent... comps)
      raises the appropriate events for each entity's component.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EntityManager

        public EntityManager()
    • Method Detail

      • Initialize

        public static void Initialize()
        Should only be called once although if it isn't called at all it will be called automatically
      • addComponent

        public static void addComponent​(Component c)
        Don't call manually
        Parameters:
        c - the comp to add
      • addEntity

        public static void addEntity​(Entity e)
        Don't call manually
        Parameters:
        e - the entity to add
      • changeName

        public static void changeName​(java.lang.String prev,
                                      java.lang.String new_)
        changes the entity's name
        Parameters:
        prev - old name
        new_ - new name
      • raiseEvents

        public static void raiseEvents​(ComponentEvent... comps)
        raises the appropriate events for each entity's component. then renders after all entities have being processed if render is requested
        Parameters:
        comps - calls the events left to right
      • cleanUp

        public static void cleanUp()
        Cleans up all entities and components. Disposes of the primary sprite batch
      • getDeltaTime

        public static float getDeltaTime()
        gets the time between the last from and the current
        Returns:
        1/FPS