diff --git a/javaecs/pom.xml b/javaecs/pom.xml
index 1f1f28b..01a9425 100644
--- a/javaecs/pom.xml
+++ b/javaecs/pom.xml
@@ -2,7 +2,7 @@
4.0.0
nz.ac.massey.javaecs
javaecs
- 1.2-PRERELEASE-v2
+ 0.9.2-PRERELEASE
1.8
1.8
diff --git a/javaecs/src/main/java/nz/ac/massey/javaecs/ECSSystem.java b/javaecs/src/main/java/nz/ac/massey/javaecs/ECSSystem.java
index 60b27ef..47e76ae 100644
--- a/javaecs/src/main/java/nz/ac/massey/javaecs/ECSSystem.java
+++ b/javaecs/src/main/java/nz/ac/massey/javaecs/ECSSystem.java
@@ -13,10 +13,14 @@ package nz.ac.massey.javaecs;
*/
import java.util.Set;
+import java.util.BitSet;
import java.util.HashSet;
public abstract class ECSSystem{
- Set entities = new HashSet<>();
+ protected Set entities = new HashSet<>();
+ protected BitSet registrationSet;
+
+ public BitSet getRegistrationSet;
/**
* Implement additional parameterised init() functions as required.
diff --git a/javaecs/src/main/java/nz/ac/massey/javaecs/SystemManager.java b/javaecs/src/main/java/nz/ac/massey/javaecs/SystemManager.java
index 0b00a35..529dff1 100644
--- a/javaecs/src/main/java/nz/ac/massey/javaecs/SystemManager.java
+++ b/javaecs/src/main/java/nz/ac/massey/javaecs/SystemManager.java
@@ -15,7 +15,7 @@ import java.util.Map;
import java.util.HashMap;
class SystemManager{
- private Map registrationSignatures = new HashMap<>();
+ //private Map registrationSignatures = new HashMap<>();
private Map systems = new HashMap<>();
/**
@@ -40,8 +40,8 @@ class SystemManager{
// Check if the signature is null
if (!entityRegistrations.equals(null)){
BitSet srcCpy = (BitSet)entityRegistrations.clone();
- srcCpy.and(registrationSignatures.get(key));
- if (srcCpy.equals(registrationSignatures.get(key))){ // Bitwise check if the entity is subscribed to this system
+ srcCpy.and(systems.get(key).registrationSet);
+ if (srcCpy.equals(systems.get(key).registrationSet)){ // Bitwise check if the entity is subscribed to this system
systems.get(key).entities.add(entity);
}
else{
@@ -63,7 +63,6 @@ class SystemManager{
return false;
}
systems.put(systemType, system);
- registrationSignatures.put(systemType, new BitSet());
return true;
}
@@ -73,7 +72,7 @@ class SystemManager{
* @param registrations the BitSet containing the required registrations set to true
*/
protected void setRegistrationSignature(Type systemType, BitSet registrations){
- registrationSignatures.put(systemType, registrations);
+ systems.get(systemType).registrationSet = registrations;
}