### Signal Constructor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/signals/Signal.html Initializes a new instance of the Signal class. No specific setup is required beyond instantiation. ```java public Signal() ``` -------------------------------- ### get(int index) Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/ImmutableArray.html Retrieves the element at the specified index. ```APIDOC ## get(int index) ### Description Retrieves the element at the specified index. ### Parameters #### Path Parameters - **index** (int) - The index of the element to retrieve. ### Returns The element at the specified index. ``` -------------------------------- ### addedToEngine Method Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IntervalIteratingSystem.html Called when this EntitySystem is added to an Engine. This method can be overridden to perform setup logic when the system becomes active. ```java public void addedToEngine(Engine engine) ``` -------------------------------- ### EntityListener Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Gets notified of `Entity` related events. ```APIDOC ## Interface EntityListener ### Description Gets notified of `Entity` related events. ### Methods - **entityAdded(Entity)**: Called whenever an `Entity` is added to `Engine` or a specific `Family`. See `Engine.addEntityListener(EntityListener)` and `Engine.addEntityListener(Family, EntityListener)`. - **entityRemoved(Entity)**: Called whenever an `Entity` is removed from `Engine` or a specific `Family`. See `Engine.addEntityListener(EntityListener)` and `Engine.addEntityListener(Family, EntityListener)`. ``` -------------------------------- ### Get All EntitySystems from Engine Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Returns an immutable array containing all EntitySystems currently managed by the Engine. ```java public ImmutableArray getSystems() ``` -------------------------------- ### Get All Components Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Entity.html Retrieves an immutable array containing all Components attached to this Entity. ```java public ImmutableArray getComponents() ``` -------------------------------- ### Get Size of Bag Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/Bag.html Returns the number of elements currently in the bag. ```java public int size() ``` -------------------------------- ### Family.Builder Methods Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Family.Builder.html The Family.Builder class provides methods to define criteria for selecting entities. You can specify components that must be present, components that must be absent, or components where at least one must be present. The get() method finalizes the construction and returns a Family object. ```APIDOC ## Family.Builder ### Description Provides methods to construct `Family` objects for entity querying. ### Methods #### `reset()` Resets the builder instance. * **Returns**: A `Builder` singleton instance to get a family. #### `all(Class... componentTypes)` Specifies that entities must contain all of the provided components. * **Parameters**: * `componentTypes` (Class...) - The components that must be present. * **Returns**: A `Builder` singleton instance to get a family. #### `one(Class... componentTypes)` Specifies that entities must contain at least one of the provided components. * **Parameters**: * `componentTypes` (Class...) - The components where at least one must be present. * **Returns**: A `Builder` singleton instance to get a family. #### `exclude(Class... componentTypes)` Specifies that entities must not contain any of the provided components. * **Parameters**: * `componentTypes` (Class...) - The components that must be excluded. * **Returns**: A `Builder` singleton instance to get a family. #### `get()` Finalizes the construction and returns a `Family` object based on the configured criteria. * **Returns**: A `Family` for the configured component types. ``` -------------------------------- ### Get Element at Index from Bag Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/Bag.html Retrieves the element at the specified position in the bag. ```java public E get(int index) ``` -------------------------------- ### Get All Entities Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Retrieves an immutable array of all entities managed by the Engine. Modifications to this array are not permitted. ```java public ImmutableArray getEntities() ``` -------------------------------- ### Get Component by Class Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Entity.html Retrieves a Component from the Entity by its class. Note: ComponentMapper provides O(1) access; this method is O(logn). ```java public T getComponent(java.lang.Class componentClass) ``` -------------------------------- ### Getting the Constructed Family Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Family.Builder.html Returns a Family object based on the current builder configuration. This Family can then be used to query entities. ```java public Family get() ``` -------------------------------- ### Get Specific EntitySystem from Engine Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Retrieves a specific EntitySystem by its class type. Useful for quick access to systems. ```java public T getSystem(java.lang.Class systemType) ``` -------------------------------- ### addEntityListener (priority, EntityListener) Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Adds an EntityListener. The listener will be notified every time an entity is added/removed to/from the engine. The priority determines in which order the entity listeners will be called. Lower value means it will get executed first. ```APIDOC ## addEntityListener ### Description Adds an EntityListener. The listener will be notified every time an entity is added/removed to/from the engine. The priority determines in which order the entity listeners will be called. Lower value means it will get executed first. ### Method public void addEntityListener(int priority, EntityListener listener) ``` -------------------------------- ### Retrieve Component from Entity Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/ComponentMapper.html Get a specific Component of a given class from an Entity. Ensure the ComponentMapper has been initialized for this component type. ```java public T get(Entity entity) ``` -------------------------------- ### Get ComponentMapper Instance Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/ComponentMapper.html Obtain a ComponentMapper for a specific Component class. This is typically done once per component type. ```java public static  ComponentMapper getFor(java.lang.Class componentClass) ``` -------------------------------- ### getIndexFor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/ComponentType.html A quick helper method to get the index for a specified Component Class. The same could be done via ComponentType.getFor(Class). ```APIDOC ## getIndexFor ### Description A quick helper method to get the index for a specified Component Class. The same could be done via `ComponentType.getFor(Class)`. ### Method ```java public static int getIndexFor(java.lang.Class componentType) ``` ### Parameters #### Path Parameters - **componentType** (java.lang.Class) - The `Component` class ### Returns - **int** - The index for the specified `Component` Class ``` -------------------------------- ### addEntityListener (Family, priority, EntityListener) Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Adds an EntityListener for a specific Family. The listener will be notified every time an entity is added/removed to/from the given family. The priority determines in which order the entity listeners will be called. Lower value means it will get executed first. ```APIDOC ## addEntityListener ### Description Adds an EntityListener for a specific Family. The listener will be notified every time an entity is added/removed to/from the given family. The priority determines in which order the entity listeners will be called. Lower value means it will get executed first. ### Method public void addEntityListener(Family family, int priority, EntityListener listener) ``` -------------------------------- ### getSystem Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Quick EntitySystem retrieval. ```APIDOC ## getSystem ### Description Quick EntitySystem retrieval. ### Method public T getSystem(java.lang.Class systemType) ``` -------------------------------- ### Get unique index for a Component class Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/ComponentType.html A quick helper method to obtain the unique integer index assigned to a specific Component class. This can also be achieved by first getting the ComponentType instance and then calling its getIndex() method. ```java public static int getIndexFor(java.lang.Class componentType) ``` -------------------------------- ### IntervalSystem Methods Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IntervalSystem.html Provides details on the methods available in the IntervalSystem class, including how to retrieve the interval, update the system, and implement the core logic. ```APIDOC ## IntervalSystem Methods ### getInterval() **Description**: Retrieves the interval at which this system's logic should be executed. **Returns**: (float) The interval in seconds. ### update(float deltaTime) **Description**: The update method called every tick. This method is part of the `EntitySystem` and is overridden here to manage the interval logic. **Parameters**: - `deltaTime` (float) - The time passed since the last frame in seconds. ### updateInterval() **Description**: Abstract method where the processing logic of the system should be placed. This method is called by the `update` method after the specified interval has passed. **Modifiers**: `abstract`, `protected` ``` -------------------------------- ### Get Random Element Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/ImmutableArray.html Returns a random element from the ImmutableArray. ```java public T random() ``` -------------------------------- ### Signal() Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Constructor for Signal. ```APIDOC ## Signal() ### Description Constructor for Signal. ### Method Not applicable (Java constructor) ### Endpoint Not applicable (Java constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response None #### Response Example None ``` -------------------------------- ### Get Array Size Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/ImmutableArray.html Returns the number of elements in the ImmutableArray. ```java public int size() ``` -------------------------------- ### IteratingSystem Constructor with Priority Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Instantiates a system that will iterate over the entities described by the Family, with a specific priority. ```APIDOC ## IteratingSystem(Family family, int priority) ### Description Instantiates a system that will iterate over the entities described by the Family, with a specific priority. ### Method Constructor ### Parameters #### Path Parameters - **family** (Family) - Required - The family of entities this system will process. - **priority** (int) - Required - The priority of the system. ``` -------------------------------- ### IntervalSystem Constructor with Priority Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IntervalSystem.html Initializes an IntervalSystem with a specified time interval and priority. Priority determines the order in which systems are updated within the engine. ```java public IntervalSystem(float interval, int priority) ``` -------------------------------- ### PooledEngine Methods Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/PooledEngine.html Methods for creating entities and components, and managing the internal pools. ```APIDOC ## createEntity() ### Description Creates a new Entity object from the engine's pool. This is an optimized way to create entities, especially in performance-critical scenarios. ### Method `public Entity createEntity()` ### Returns A clean `Entity` object retrieved from the engine's pool. Remember to add the entity to the engine using `Engine.addEntity(Entity)` after creation. ### Overrides `createEntity` in class `Engine` ``` ```APIDOC ## createComponent(Class componentType) ### Description Retrieves a new `Component` of the specified type from the engine's pool. Components obtained this way are automatically returned to the pool when removed from an entity or when the entity is removed from the engine. ### Method `public T createComponent(java.lang.Class componentType)` ### Parameters * **componentType** (Class) - The class of the component to create. ### Returns A new instance of the specified component type from the pool. ### Overrides `createComponent` in class `Engine` ``` ```APIDOC ## clearPools() ### Description Removes all free entities and components from their respective pools. This action can free up memory, potentially triggering garbage collection. ### Method `public void clearPools()` ``` ```APIDOC ## removeEntityInternal(Entity entity) ### Description An internal method used by the Engine to remove an entity. This method is overridden in `PooledEngine` to manage component pooling when entities are removed. ### Method `protected void removeEntityInternal(Entity entity)` ### Overrides `removeEntityInternal` in class `Engine` ``` -------------------------------- ### Get Element by Index Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/ImmutableArray.html Retrieves the element at the specified index from the ImmutableArray. ```java public T get(int index) ``` -------------------------------- ### Get Iterator Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/ImmutableArray.html Returns an iterator over the elements in the ImmutableArray. Implements the Iterable interface. ```java public java.util.Iterator iterator() ``` -------------------------------- ### Create PooledEngine with default pool sizes Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/PooledEngine.html Creates a new PooledEngine with default maximums of 100 entities and 100 components of each type. Use the overloaded constructor for custom pool sizes. ```java public PooledEngine() ``` -------------------------------- ### Create PooledEngine with custom pool sizes Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/PooledEngine.html Creates a new PooledEngine with specified initial and maximum sizes for entity and component pools. This allows fine-tuning memory management based on application needs. ```java public PooledEngine(int entityPoolInitialSize, int entityPoolMaxSize, int componentPoolInitialSize, int componentPoolMaxSize) ``` -------------------------------- ### Get First Element Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/ImmutableArray.html Retrieves the first element of the ImmutableArray without removing it. ```java public T first() ``` -------------------------------- ### IteratingSystem Constructor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Instantiates a system that will iterate over the entities described by the Family. ```APIDOC ## IteratingSystem(Family family) ### Description Instantiates a system that will iterate over the entities described by the Family. ### Method Constructor ### Parameters #### Path Parameters - **family** (Family) - Required - The family of entities this system will process. ``` -------------------------------- ### PooledEngine Constructor with Pools Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Supports `Entity` and `Component` pooling. ```APIDOC ## PooledEngine(int entityPoolSize, int componentPoolSize, int familyPoolSize, int nodePoolSize) ### Description Supports `Entity` and `Component` pooling. ### Method Constructor ### Parameters #### Path Parameters - **entityPoolSize** (int) - Required - The size of the entity pool. - **componentPoolSize** (int) - Required - The size of the component pool. - **familyPoolSize** (int) - Required - The size of the family pool. - **nodePoolSize** (int) - Required - The size of the node pool. ``` -------------------------------- ### Get Last Element Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/ImmutableArray.html Retrieves the last element of the ImmutableArray without removing it. ```java public T peek() ``` -------------------------------- ### Family Builder Methods Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Family.html These static methods initiate the building of a Family. They return a Family.Builder instance which can be used to define the component requirements for the family. ```APIDOC ## Static Methods for Family Creation ### `all(java.lang.Class... componentTypes)` #### Description Creates a family that requires entities to possess all of the specified components. #### Parameters * `componentTypes` (Class...) - Required - The component types that an entity must have. #### Returns A `Family.Builder` instance to continue building the family. ### `one(java.lang.Class... componentTypes)` #### Description Creates a family that requires entities to possess at least one of the specified components. #### Parameters * `componentTypes` (Class...) - Required - The component types that an entity must have at least one of. #### Returns A `Family.Builder` instance to continue building the family. ### `exclude(java.lang.Class... componentTypes)` #### Description Creates a family that requires entities to not possess any of the specified components. #### Parameters * `componentTypes` (Class...) - Required - The component types that an entity must not have. #### Returns A `Family.Builder` instance to continue building the family. ``` -------------------------------- ### Entity Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Simple containers of `Component`s that give them "data". ```APIDOC ## Class Entity ### Description Simple containers of `Component`s that give them "data". ### Methods - **Entity()**: Creates an empty Entity. - **getComponent(Class)**: Retrieve a component from this `Entity` by class. - **getComponents()**: Returns an `ImmutableArray` of all components managed by this `Entity`. ``` -------------------------------- ### IteratingSystem Constructors Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IteratingSystem.html Instantiates a system that will iterate over the entities described by the Family. Systems can be prioritized for execution order. ```APIDOC ## IteratingSystem Constructors ### Description Instantiates a system that will iterate over the entities described by the Family. Systems can be prioritized for execution order. ### Constructor 1 ```java public IteratingSystem(Family family) ``` #### Parameters * **family** (Family) - Required - The family of entities iterated over in this System. ### Constructor 2 ```java public IteratingSystem(Family family, int priority) ``` #### Parameters * **family** (Family) - Required - The family of entities iterated over in this System. * **priority** (int) - Required - The priority to execute this system with (lower means higher priority). ``` -------------------------------- ### Get Capacity of Bag Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/Bag.html Returns the number of elements the bag can hold without needing to grow. ```java public int getCapacity() ``` -------------------------------- ### PooledEngine Constructors Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/PooledEngine.html Constructors for creating and configuring a PooledEngine instance. Allows for setting initial and maximum sizes for entity and component pools. ```APIDOC ## PooledEngine() ### Description Creates a new PooledEngine with a default maximum of 100 entities and 100 components of each type. Use the overloaded constructor to configure specific pool sizes. ### Constructor `public PooledEngine()` ### Remarks This constructor initializes the engine with predefined pool sizes for entities and components. ``` ```APIDOC ## PooledEngine(int entityPoolInitialSize, int entityPoolMaxSize, int componentPoolInitialSize, int componentPoolMaxSize) ### Description Creates a new PooledEngine with custom pool size configurations for entities and components. ### Constructor `public PooledEngine(int entityPoolInitialSize, int entityPoolMaxSize, int componentPoolInitialSize, int componentPoolMaxSize)` ### Parameters * **entityPoolInitialSize** (int) - The initial number of pre-allocated entities. * **entityPoolMaxSize** (int) - The maximum number of pooled entities. * **componentPoolInitialSize** (int) - The initial size for each component type pool. * **componentPoolMaxSize** (int) - The maximum size for each component type pool. ``` -------------------------------- ### Get the unique index of a ComponentType Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/ComponentType.html Returns the unique integer index assigned to this specific ComponentType instance. ```java public int getIndex() ``` -------------------------------- ### Create Component Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Creates a new Component instance. Requires that the component class has a visible no-argument constructor. ```java public T createComponent(java.lang.Class componentType) ``` -------------------------------- ### EntitySystem Constructor with Priority Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/EntitySystem.html Initializes the EntitySystem with a specified priority. Lower numbers mean higher priority. ```java public EntitySystem(int priority) ``` -------------------------------- ### Create a Family with All Components Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Family.html Use this method to create a Family that selects entities containing all of the specified components. This is useful for systems that require a complete set of components to function. ```java public static final Family.Builder all(java.lang.Class... componentTypes) ``` -------------------------------- ### Get Entities for Family Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Retrieves an immutable collection of entities that match a specific Family. The same instance is returned for the same Family. ```java public ImmutableArray getEntitiesFor(Family family) ``` -------------------------------- ### IntervalSystem Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html A system that runs at a specified interval. ```APIDOC ## Class IntervalSystem ### Description A system that runs at a specified interval. ### Methods - **getInterval()**: Returns the interval in seconds the system is set to run. ``` -------------------------------- ### PooledEngine Constructor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Supports `Entity` and `Component` pooling. ```APIDOC ## PooledEngine() ### Description Supports `Entity` and `Component` pooling. ### Method Constructor ### Parameters This constructor does not take any parameters. ``` -------------------------------- ### IteratingSystem Constructor with Family and Priority Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IteratingSystem.html Instantiates a system that will iterate over the entities described by the Family, with a specific priority. Systems with lower priority values are executed first. ```java public IteratingSystem(Family family, int priority) ``` -------------------------------- ### getSystems Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Returns an immutable array of all entity systems managed by the Engine. ```APIDOC ## getSystems ### Description Returns an immutable array of all entity systems managed by the Engine. ### Method public ImmutableArray getSystems() ``` -------------------------------- ### IntervalSystem Constructor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IntervalSystem.html Initializes an IntervalSystem with a specified time interval between updates. The actual logic should be implemented in the updateInterval() method. ```java public IntervalSystem(float interval) ``` -------------------------------- ### IteratingSystem Methods Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IteratingSystem.html Provides methods for managing the system's lifecycle, accessing entities and family, and processing individual entities. ```APIDOC ## IteratingSystem Methods ### Description Provides methods for managing the system's lifecycle, accessing entities and family, and processing individual entities. ### addedToEngine ```java public void addedToEngine(Engine engine) ``` #### Description Called when this EntitySystem is added to an `Engine`. #### Parameters * **engine** (Engine) - The `Engine` this system was added to. ### removedFromEngine ```java public void removedFromEngine(Engine engine) ``` #### Description Called when this EntitySystem is removed from an `Engine`. #### Parameters * **engine** (Engine) - The `Engine` the system was removed from. ### update ```java public void update(float deltaTime) ``` #### Description The update method called every tick. This method iterates over entities and calls `processEntity` for each. #### Parameters * **deltaTime** (float) - The time passed since last frame in seconds. ### getEntities ```java public ImmutableArray getEntities() ``` #### Description Returns the set of entities processed by the system. #### Returns * ImmutableArray - Set of entities processed by the system. ### getFamily ```java public Family getFamily() ``` #### Description Returns the `Family` used when the system was created. #### Returns * Family - The Family used when the system was created. ### processEntity ```java protected abstract void processEntity(Entity entity, float deltaTime) ``` #### Description This method is called on every entity on every update call of the EntitySystem. Override this to implement your system's specific processing. #### Parameters * **entity** (Entity) - The current Entity being processed. * **deltaTime** (float) - The delta time between the last and current frame. ``` -------------------------------- ### Engine Constructor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Initializes a new instance of the Engine class. This is the primary way to create an Engine object. ```java public Engine() ``` -------------------------------- ### Get ComponentType instance for a Component class Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/ComponentType.html Retrieves the unique ComponentType instance associated with a given Component class. Each component class will always return the same instance. ```java public static ComponentType getFor(java.lang.Class componentType) ``` -------------------------------- ### SortedIteratingSystem(Family, Comparator, int) Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Instantiates a system that will iterate over the entities described by the Family, with a specific priority. ```APIDOC ## SortedIteratingSystem(Family, Comparator, int) ### Description Instantiates a system that will iterate over the entities described by the Family, with a specific priority. ### Method Not applicable (Java constructor) ### Endpoint Not applicable (Java constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response None #### Response Example None ``` -------------------------------- ### Engine.update(float) Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Updates all the systems in this Engine. ```APIDOC ## Engine.update(float) ### Description Updates all the systems in this Engine. ### Method Not applicable (Java method) ### Endpoint Not applicable (Java method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response None #### Response Example None ``` -------------------------------- ### addSystem Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Adds an EntitySystem to this Engine. If the Engine already had a system of the same class, the new one will replace the old one. ```APIDOC ## addSystem ### Description Adds an EntitySystem to this Engine. If the Engine already had a system of the same class, the new one will replace the old one. ### Method public void addSystem(EntitySystem system) ``` -------------------------------- ### IntervalIteratingSystem Constructor with Priority Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IntervalIteratingSystem.html Initializes the IntervalIteratingSystem with a family, an interval, and a priority. The priority determines the order in which systems are processed by the engine. ```java public IntervalIteratingSystem(Family family, float interval, int priority) ``` -------------------------------- ### EntitySystem Constructors Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/EntitySystem.html Constructors for initializing an EntitySystem. The default constructor sets priority to 0, while the parameterized constructor allows specifying a custom priority. ```APIDOC ## EntitySystem() ### Description Default constructor that will initialise an EntitySystem with priority 0. ### Constructor `EntitySystem()` ``` ```APIDOC ## EntitySystem(int priority) ### Description Initialises the EntitySystem with the priority specified. ### Constructor `EntitySystem(int priority)` ### Parameters * **priority** (int) - The priority to execute this system with (lower means higher priority). ``` -------------------------------- ### Building a Family with All Components Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Family.Builder.html Configures the builder to match entities that contain all of the specified component types. Use this when an entity must have a specific set of components. ```java @SafeVarargs public final Family.Builder all(java.lang.Class... componentTypes) ``` -------------------------------- ### SortedIteratingSystem Constructor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/SortedIteratingSystem.html Instantiates a system that will iterate over the entities described by the Family. This is the basic constructor for systems that do not require a specific priority. ```java public SortedIteratingSystem(Family family, java.util.Comparator comparator) ``` -------------------------------- ### IntervalIteratingSystem Constructors Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IntervalIteratingSystem.html Constructors for creating an IntervalIteratingSystem. You can specify the family of entities to process, the interval between updates, and an optional priority. ```APIDOC ## IntervalIteratingSystem Constructors ### `IntervalIteratingSystem(Family family, float interval)` **Description**: Constructs an IntervalIteratingSystem with the specified family and interval. **Parameters**: - `family` (Family): The collection of entities the system should process. - `interval` (float): The time in seconds between calls to `updateInterval()`. ### `IntervalIteratingSystem(Family family, float interval, int priority)` **Description**: Constructs an IntervalIteratingSystem with the specified family, interval, and priority. **Parameters**: - `family` (Family): The collection of entities the system should process. - `interval` (float): The time in seconds between calls to `updateInterval()`. - `priority` (int): The priority of the system. ``` -------------------------------- ### SortedIteratingSystem Constructor with Priority Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/SortedIteratingSystem.html Instantiates a system that will iterate over the entities described by the Family, with a specific priority. Use this constructor when you need to define the execution order of systems. ```java public SortedIteratingSystem(Family family, java.util.Comparator comparator, int priority) ``` -------------------------------- ### getEngine Method Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/EntitySystem.html Retrieves the Engine instance the system is currently registered to. Returns null if the system is not associated with any engine. ```java public Engine getEngine() ``` -------------------------------- ### Entity Constructor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Entity.html Creates an empty Entity. Entities are containers for Components. ```APIDOC ## Entity() ### Description Creates an empty Entity. ### Constructor `Entity()` ``` -------------------------------- ### Entity Constructor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Entity.html Creates an empty Entity. This is the basic constructor for initializing an Entity object. ```java public Entity() ``` -------------------------------- ### SortedIteratingSystem Constructors Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/SortedIteratingSystem.html Constructors for creating a SortedIteratingSystem. You can instantiate a system that will iterate over entities described by a Family, with or without a specific priority. ```APIDOC ## SortedIteratingSystem(Family family, Comparator comparator) ### Description Instantiates a system that will iterate over the entities described by the Family. ### Parameters * **family** (Family) - The family of entities iterated over in this System * **comparator** (Comparator) - The comparator to sort the entities ## SortedIteratingSystem(Family family, Comparator comparator, int priority) ### Description Instantiates a system that will iterate over the entities described by the Family, with a specific priority. ### Parameters * **family** (Family) - The family of entities iterated over in this System * **comparator** (Comparator) - The comparator to sort the entities * **priority** (int) - The priority to execute this system with (lower means higher priority) ``` -------------------------------- ### Bag Constructor with Specified Capacity Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/Bag.html Initializes an empty Bag with a specified initial capacity. ```java public Bag(int capacity) ``` -------------------------------- ### SortedIteratingSystem(Family, Comparator) Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Instantiates a system that will iterate over the entities described by the Family. ```APIDOC ## SortedIteratingSystem(Family, Comparator) ### Description Instantiates a system that will iterate over the entities described by the Family. ### Method Not applicable (Java constructor) ### Endpoint Not applicable (Java constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response None #### Response Example None ``` -------------------------------- ### IntervalSystem Constructors Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IntervalSystem.html IntervalSystem can be instantiated with a specified interval or with an interval and a priority. The interval determines how often the updateInterval() method is called. ```APIDOC ## IntervalSystem Constructors ### IntervalSystem(float interval) **Description**: Initializes a new instance of the `IntervalSystem` class with a specified interval. **Parameters**: - `interval` (float) - The time in seconds between calls to `updateInterval()`. ### IntervalSystem(float interval, int priority) **Description**: Initializes a new instance of the `IntervalSystem` class with a specified interval and priority. **Parameters**: - `interval` (float) - The time in seconds between calls to `updateInterval()`. - `priority` (int) - The priority of the system. ``` -------------------------------- ### getFamily Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/SortedIteratingSystem.html Returns the Family used when the system was created. ```APIDOC ## getFamily ### Description Returns the Family used when the system was created. ### Method public Family getFamily() ### Returns - **Family** - the Family used when the system was created ``` -------------------------------- ### IntervalIteratingSystem Constructor with Priority Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html A simple EntitySystem that processes a Family of entities not once per frame, but after a given interval. ```APIDOC ## IntervalIteratingSystem(Family family, float interval, int priority) ### Description A simple EntitySystem that processes a Family of entities not once per frame, but after a given interval. ### Method Constructor ### Parameters #### Path Parameters - **family** (Family) - Required - The family of entities this system will process. - **interval** (float) - Required - The interval in seconds between entity processing. - **priority** (int) - Required - The priority of the system. ``` -------------------------------- ### Bag Constructor with Default Capacity Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/Bag.html Initializes an empty Bag with a default capacity of 64 elements. ```java public Bag() ``` -------------------------------- ### IntervalIteratingSystem Constructor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html A simple EntitySystem that processes a Family of entities not once per frame, but after a given interval. ```APIDOC ## IntervalIteratingSystem(Family family, float interval) ### Description A simple EntitySystem that processes a Family of entities not once per frame, but after a given interval. ### Method Constructor ### Parameters #### Path Parameters - **family** (Family) - Required - The family of entities this system will process. - **interval** (float) - Required - The interval in seconds between entity processing. ``` -------------------------------- ### Engine Methods Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html This section details the core methods available on the Engine class for managing entities and systems. ```APIDOC ## Engine Methods ### Description Provides methods to manage entities and systems within the Ashley framework. ### Methods - **`createEntity()`** Creates a new Entity object. Returns: `Entity` - **`createComponent(Class componentType)`** Creates a new `Component`. Requires components to have a visible no-arg constructor. Returns: `T` (the created component) - **`addEntity(Entity entity)`** Adds an entity to this Engine. Throws `IllegalArgumentException` if the entity is already registered. - **`removeEntity(Entity entity)`** Removes an entity from this Engine. - **`removeAllEntities(Family family)`** Removes all entities of the given `Family`. - **`removeAllEntities()`** Removes all entities registered with this Engine. - **`getEntities()`** Returns an `ImmutableArray` of `Entity` managed by the Engine. This array cannot be used to modify the Engine's state. Returns: `ImmutableArray` - **`addSystem(EntitySystem system)`** Adds the `EntitySystem` to this Engine. - **`removeSystem(EntitySystem system)`** Removes the `EntitySystem` from this Engine. - **`update(float deltaTime)`** Updates all the systems in this Engine. ``` -------------------------------- ### Bag Constructors Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/utils/Bag.html Provides constructors for initializing a Bag with a default or specified capacity. ```APIDOC ## Bag() ### Description Initializes an empty Bag with a default capacity of 64. ### Constructor ```java public Bag() ``` ## Bag(int capacity) ### Description Initializes an empty Bag with the specified initial capacity. ### Constructor ```java public Bag(int capacity) ``` ### Parameters * `capacity` (int) - The initial capacity of the Bag. ``` -------------------------------- ### update Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Updates all the systems in this Engine. ```APIDOC ## update ### Description Updates all the systems in this Engine. ### Parameters #### Path Parameters - **deltaTime** (float) - Required - The time passed since the last frame. ### Method public void update(float deltaTime) ``` -------------------------------- ### EntitySystem Default Constructor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/EntitySystem.html Initializes an EntitySystem with a default priority of 0. ```java public EntitySystem() ``` -------------------------------- ### IntervalIteratingSystem Constructor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IntervalIteratingSystem.html Initializes the IntervalIteratingSystem with a family and an interval. The system will process entities belonging to the specified family after the given interval in seconds. ```java public IntervalIteratingSystem(Family family, float interval) ``` -------------------------------- ### PooledEngine Class Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/package-summary.html Supports Entity and Component pooling. This class provides optimized performance by reusing entities and components instead of creating new ones. ```APIDOC ## PooledEngine Class ### Description Supports `Entity` and `Component` pooling. This class provides optimized performance by reusing entities and components instead of creating new ones. ### Class `PooledEngine` ``` -------------------------------- ### Signal Methods Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Methods for managing signals and listeners. ```APIDOC ## add(Listener) ### Description Add a Listener to this Signal. ### Method add ### Endpoint com.badlogic.ashley.signals.Signal ### Parameters #### Path Parameters - **listener** (Listener) - Required - The listener to add. ### Response #### Success Response N/A (void method) ## dispatch(T) ### Description Dispatches an event to all Listeners registered to this Signal. ### Method dispatch ### Endpoint com.badlogic.ashley.signals.Signal ### Parameters #### Path Parameters - **event** (T) - Required - The event to dispatch. ### Response #### Success Response N/A (void method) ``` -------------------------------- ### IntervalSystem Constructor with Priority Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html A simple EntitySystem that does not run its update logic every call to EntitySystem.update(float), but after a given interval. ```APIDOC ## IntervalSystem(float interval, int priority) ### Description A simple EntitySystem that does not run its update logic every call to EntitySystem.update(float), but after a given interval. ### Method Constructor ### Parameters #### Path Parameters - **interval** (float) - Required - The interval in seconds between system updates. - **priority** (int) - Required - The priority of the system. ``` -------------------------------- ### checkProcessing Method Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/EntitySystem.html Determines whether or not the system should be processed by the Engine. Override to conditionally enable/disable system updates. ```java public boolean checkProcessing() ``` -------------------------------- ### IntervalIteratingSystem.updateInterval() Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html The processing logic of the system should be placed here. ```APIDOC ## IntervalIteratingSystem.updateInterval() ### Description The processing logic of the system should be placed here. ### Method Not applicable (Java method) ### Endpoint Not applicable (Java method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response None #### Response Example None ``` -------------------------------- ### Family Instance Methods Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Family.html These methods operate on an existing Family instance to retrieve information or check entity compatibility. ```APIDOC ## Instance Methods for Family ### `getIndex()` #### Description Retrieves the unique index assigned to this family. #### Returns An integer representing the family's unique index. ### `matches(Entity entity)` #### Description Checks if the given entity matches the requirements of this family. #### Parameters * `entity` (Entity) - Required - The entity to check. #### Returns `true` if the entity matches the family's component requirements, `false` otherwise. ``` -------------------------------- ### IntervalIteratingSystem Methods Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IntervalIteratingSystem.html Methods available for IntervalIteratingSystem, including adding to the engine, retrieving entities and family, and the core processing logic. ```APIDOC ## IntervalIteratingSystem Methods ### `void addedToEngine(Engine engine)` **Description**: Called when this EntitySystem is added to an `Engine`. **Parameters**: - `engine` (Engine): The `Engine` this system was added to. ### `protected abstract void processEntity(Entity entity)` **Description**: The user should place the entity processing logic here. This method is called for each entity that matches the system's family. **Parameters**: - `entity` (Entity): The entity to process. ### `protected void updateInterval()` **Description**: The processing logic of the system should be placed here. This method is called at the specified interval. ### `ImmutableArray getEntities()` **Description**: Retrieves the set of entities processed by the system. **Returns**: ImmutableArray: The set of entities. ### `Family getFamily()` **Description**: Retrieves the Family used when the system was created. **Returns**: Family: The family used by the system. ``` -------------------------------- ### IteratingSystem Constructor with Family Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IteratingSystem.html Instantiates a system that will iterate over the entities described by the Family. This is the basic constructor for systems that need to process entities based on a specific family. ```java public IteratingSystem(Family family) ``` -------------------------------- ### Add and Return Component Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Entity.html Adds a Component to this Entity and returns the added Component. Useful for direct manipulation, especially with PooledComponents. ```java public T addAndReturn(T component) ``` -------------------------------- ### SortedIteratingSystem Methods Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/SortedIteratingSystem.html Methods for managing and interacting with the SortedIteratingSystem, including forcing a re-sort, accessing entities and families, and the core entity processing logic. ```APIDOC ## forceSort() ### Description Call this if the sorting criteria have changed. The actual sorting will be delayed until the entities are processed. ## addedToEngine(Engine engine) ### Description Called when this EntitySystem is added to an Engine. ### Overrides `addedToEngine` in class `EntitySystem` ### Parameters * **engine** (Engine) - The Engine this system was added to. ## removedFromEngine(Engine engine) ### Description Called when this EntitySystem is removed from an Engine. ### Overrides `removedFromEngine` in class `EntitySystem` ### Parameters * **engine** (Engine) - The Engine this system was removed from. ## entityAdded(Entity entity) ### Description Called whenever an Entity is added to Engine or a specific Family. See `Engine.addEntityListener(EntityListener)` and `Engine.addEntityListener(Family, EntityListener)`. ### Parameters * **entity** (Entity) - The entity that was added. ## entityRemoved(Entity entity) ### Description Called whenever an Entity is removed from Engine or a specific Family. See `Engine.addEntityListener(EntityListener)` and `Engine.addEntityListener(Family, EntityListener)`. ### Parameters * **entity** (Entity) - The entity that was removed. ## getEntities() ### Description Returns an immutable array of entities managed by this system. ### Returns * ImmutableArray - The array of entities. ## getFamily() ### Description Returns the family of entities this system is processing. ### Returns * Family - The family of entities. ## processEntity(Entity entity, float deltaTime) ### Description This method is called on every entity on every update call of the EntitySystem. This is an abstract method and must be implemented by subclasses. ### Parameters * **entity** (Entity) - The entity to process. * **deltaTime** (float) - The time elapsed since the last frame. ## update(float deltaTime) ### Description The update method called every tick. This method is responsible for iterating over the entities and calling `processEntity` for each one. ### Parameters * **deltaTime** (float) - The time elapsed since the last frame. ``` -------------------------------- ### SortedIteratingSystem Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html An abstract system that processes entities in a sorted order. ```APIDOC ## Class SortedIteratingSystem ### Description An abstract system that processes entities in a sorted order. ### Methods - **forceSort()**: Call this if the sorting criteria have changed. ``` -------------------------------- ### getFamily Method Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/systems/IntervalIteratingSystem.html Returns the Family used when the system was created. This allows checking which entities the system is configured to process. ```java public Family getFamily() ``` -------------------------------- ### removeAllSystems Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Removes all systems from this Engine. ```APIDOC ## removeAllSystems ### Description Removes all systems from this Engine. ### Method public void removeAllSystems() ``` -------------------------------- ### IntervalSystem.updateInterval() Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html The processing logic of the system should be placed here. ```APIDOC ## IntervalSystem.updateInterval() ### Description The processing logic of the system should be placed here. ### Method Not applicable (Java method) ### Endpoint Not applicable (Java method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response None #### Response Example None ``` -------------------------------- ### Entity Methods Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Methods for managing components and entities within the Ashley framework. ```APIDOC ## add(Component) ### Description Adds a `Component` to this Entity. ### Method add ### Endpoint com.badlogic.ashley.core.Entity ### Parameters #### Path Parameters - **component** (Component) - Required - The component to add. ### Response #### Success Response N/A (void method) ## addAndReturn(Component) ### Description Adds a `Component` to this Entity and returns it. ### Method addAndReturn ### Endpoint com.badlogic.ashley.core.Entity ### Parameters #### Path Parameters - **component** (Component) - Required - The component to add. ### Response #### Success Response (Component) - Returns the added component. ``` -------------------------------- ### Create Entity Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Engine.html Creates a new Entity object that can be managed by the Engine. Ensure entities are added to the engine after creation. ```java public Entity createEntity() ``` -------------------------------- ### IntervalSystem Constructor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html A simple EntitySystem that does not run its update logic every call to EntitySystem.update(float), but after a given interval. ```APIDOC ## IntervalSystem(float interval) ### Description A simple EntitySystem that does not run its update logic every call to EntitySystem.update(float), but after a given interval. ### Method Constructor ### Parameters #### Path Parameters - **interval** (float) - Required - The interval in seconds between system updates. ``` -------------------------------- ### EntitySystem Lifecycle Methods Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/EntitySystem.html Methods called when the EntitySystem is added to or removed from an Engine, and the main update loop. ```APIDOC ## addedToEngine(Engine engine) ### Description Called when this EntitySystem is added to an `Engine`. ### Method `void addedToEngine(Engine engine)` ### Parameters * **engine** (Engine) - The `Engine` this system was added to. ``` ```APIDOC ## removedFromEngine(Engine engine) ### Description Called when this EntitySystem is removed from an `Engine`. ### Method `void removedFromEngine(Engine engine)` ### Parameters * **engine** (Engine) - The `Engine` the system was removed from. ``` ```APIDOC ## update(float deltaTime) ### Description The update method called every tick. ### Method `void update(float deltaTime)` ### Parameters * **deltaTime** (float) - The time passed since last frame in seconds. ``` -------------------------------- ### addedToEngine Method Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/EntitySystem.html Callback method invoked when this EntitySystem is added to an Engine. Use this for initialization logic tied to the engine. ```java public void addedToEngine(Engine engine) ``` -------------------------------- ### EntitySystem Engine Access Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/EntitySystem.html Method to retrieve the Engine instance the system is registered to. ```APIDOC ## getEngine() ### Description Retrieves the engine instance the system is registered to. ### Method `Engine getEngine()` ### Returns * (Engine) - The `Engine` instance the system is registered to. It will be null if the system is not associated to any engine instance. ``` -------------------------------- ### EntitySystem.setProcessing(boolean) Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Sets whether or not the system should be processed by the Engine. ```APIDOC ## EntitySystem.setProcessing(boolean) ### Description Sets whether or not the system should be processed by the `Engine`. ### Method Not applicable (Java method) ### Endpoint Not applicable (Java method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response None #### Response Example None ``` -------------------------------- ### EntitySystem Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/index-all.html Abstract class for processing sets of `Entity` objects. ```APIDOC ## Class EntitySystem ### Description Abstract class for processing sets of `Entity` objects. ### Methods - **EntitySystem()**: Default constructor that will initialise an EntitySystem with priority 0. - **EntitySystem(int)**: Initialises the EntitySystem with the priority specified. - **getEngine()**: Returns the `Engine` this system belongs to. ``` -------------------------------- ### setProcessing Method Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/EntitySystem.html Sets whether or not the system should be processed by the Engine. This can be used to enable or disable systems dynamically. ```java public void setProcessing(boolean processing) ``` -------------------------------- ### Building a Family with One of Several Components Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/Family.Builder.html Configures the builder to match entities that contain at least one of the specified component types. Use this when an entity can have any one of a set of components. ```java @SafeVarargs public final Family.Builder one(java.lang.Class... componentTypes) ``` -------------------------------- ### getBitsFor Source: https://javadoc.io/doc/com.badlogicgames.ashley/ashley/1.7.4/com/badlogic/ashley/core/ComponentType.html Generates a Bits object representing a collection of components, useful for quick comparison and matching. ```APIDOC ## getBitsFor ### Description Generates a Bits object representing a collection of components, useful for quick comparison and matching. See `Family#getFor(Bits, Bits, Bits)`. ### Method ```java public static com.badlogic.gdx.utils.Bits getBitsFor(java.lang.Class... componentTypes) ``` ### Parameters #### Path Parameters - **componentTypes** (java.lang.Class...) - list of `Component` classes ### Returns - **com.badlogic.gdx.utils.Bits** - Bits representing the collection of components for quick comparison and matching. See `Family#getFor(Bits, Bits, Bits)`. ```