Made Manager classes public

This commit is contained in:
Brychan Dempsey 2021-06-14 18:20:29 +12:00
parent 6d8574b951
commit ccabef5226
5 changed files with 4 additions and 5 deletions

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>nz.ac.massey.javaecs</groupId> <groupId>nz.ac.massey.javaecs</groupId>
<artifactId>javaecs</artifactId> <artifactId>javaecs</artifactId>
<version>1.0.0</version> <version>1.0.1</version>
<properties> <properties>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>

View File

@ -16,7 +16,7 @@ import java.util.HashMap;
/** /**
* Manages the addition, sorting and retrieving of components and component data * Manages the addition, sorting and retrieving of components and component data
*/ */
class ComponentManager{ public class ComponentManager{
private Map<Type, Map<Entity, Object>> componentArrays = new HashMap<>(); private Map<Type, Map<Entity, Object>> componentArrays = new HashMap<>();
// Need to be able to map bit indices and component types // Need to be able to map bit indices and component types
private Map<Integer, Type> indexComponentType = new HashMap<>(); private Map<Integer, Type> indexComponentType = new HashMap<>();

View File

@ -151,7 +151,6 @@ public class Engine {
int componentIndex = componentManager.getComponentIndex(componentType); int componentIndex = componentManager.getComponentIndex(componentType);
if (entityManager.registerComponent(componentIndex, entity)) if (entityManager.registerComponent(componentIndex, entity))
{ {
//systemManager.entityRegistrationAdded(entity, componentIndex);
systemManager.entityRegistrationsChanged(entity, entityManager.getRegistrations(entity)); systemManager.entityRegistrationsChanged(entity, entityManager.getRegistrations(entity));
componentManager.addComponentToEntity(componentType, component, entity); componentManager.addComponentToEntity(componentType, component, entity);
return true; return true;

View File

@ -20,7 +20,7 @@ import java.util.ArrayList;
* <p> * <p>
* I.e. Controls adding and removing entities, and registration and deregistration of components. * I.e. Controls adding and removing entities, and registration and deregistration of components.
*/ */
class EntityManager{ public class EntityManager{
// According to https://stackoverflow.com/questions/12524826/why-should-i-use-deque-over-stack // According to https://stackoverflow.com/questions/12524826/why-should-i-use-deque-over-stack
// ArrayDeque is likely faster than a LinkedList, when used in place of one. // ArrayDeque is likely faster than a LinkedList, when used in place of one.
// We can also supply a size to the constructor of ArrayDeque, which avoids resizing the collection // We can also supply a size to the constructor of ArrayDeque, which avoids resizing the collection

View File

@ -18,7 +18,7 @@ import java.util.HashMap;
* Manages system-focused aspects, such as ensuring a system has the correct list of current entities. * Manages system-focused aspects, such as ensuring a system has the correct list of current entities.
* Manages registration of new systems * Manages registration of new systems
*/ */
class SystemManager{ public class SystemManager{
private Map<Type, ECSSystem> systems = new HashMap<>(); private Map<Type, ECSSystem> systems = new HashMap<>();
/** /**