Class Component<T>

  • Direct Known Subclasses:
    FSMComponent

    public abstract class Component<T>
    extends java.lang.Object
    An Entity represents a single object in your world. Component represents one aspect of an object. For example, a bottle of water has a shape, a volume, a color and is made of a material (usually plastic). In this example, the bottle is the entity, and the properties are components.
    Author:
    kong
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected T _entity
      A pointer to the agent that owns this instance
    • Constructor Summary

      Constructors 
      Constructor Description
      Component​(T entity)  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract void update​(double deltaTime)
      This method is called every frames
      • Methods inherited from class java.lang.Object

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

      • _entity

        protected final T _entity
        A pointer to the agent that owns this instance
    • Constructor Detail

      • Component

        public Component​(T entity)
    • Method Detail

      • update

        public abstract void update​(double deltaTime)
        This method is called every frames
        Parameters:
        deltaTime - the time between two consecutive frames