Class Component

    • Field Detail

      • parent

        protected Entity parent
      • requirements

        protected java.util.ArrayList<ComponentType> requirements
      • reqsMet

        protected boolean reqsMet
    • Constructor Detail

      • Component

        protected Component()
        sets up the Component
    • Method Detail

      • setParent

        public void setParent​(Entity e)
        Parameters:
        e - the Entity to set the parent of this component to
      • getParent

        public Entity getParent()
        Returns:
        the parent of this component
      • setRequirements

        public final void setRequirements​(ComponentType... reqs)
        Sets the required components
        Parameters:
        reqs - take a guess
      • getType

        public final ComponentType getType()
        Returns:
        the type of the component
      • awake

        public void awake()
        Called once before start prior to the update loop.
      • start

        public void start()
        Called once after awake but prior to the update loop.
      • cleanUp

        public void cleanUp()
        Called once after the update loop has finished.
      • update

        public void update()
        Called once per frame
      • render

        public void render()
        Called once per frame used exclusively for rendering