Version change to 1.0.0
This commit is contained in:
parent
84d71c0df7
commit
e578e72b46
@ -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>0.9.9-RELEASE_CANDIDATE</version>
|
<version>1.0.0</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>
|
||||||
|
@ -152,4 +152,15 @@ class ComponentManager{
|
|||||||
componentArrays.get(componentType).remove(entity);
|
componentArrays.get(componentType).remove(entity);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the entity contains data for the provided component
|
||||||
|
* @param entity the entity to check
|
||||||
|
* @param componentType the component class type
|
||||||
|
* @return true if the entity has component data
|
||||||
|
*/
|
||||||
|
public boolean entityHasComponentData(Entity entity, Type componentType){
|
||||||
|
if (componentArrays.get(componentType).containsKey(entity)) return true;
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
}
|
}
|
@ -116,6 +116,16 @@ public class Engine {
|
|||||||
return entityManager.getNumEntities();
|
return entityManager.getNumEntities();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the entity is subscribed to the provided type
|
||||||
|
* @param entity the entity to search
|
||||||
|
* @param componentType the class type of the component to search
|
||||||
|
* @return true if the entity is subscribed
|
||||||
|
*/
|
||||||
|
public boolean entityHasComponent(Entity entity, Type componentType){
|
||||||
|
return entityManager.getRegistrations(entity).get(componentManager.getComponentIndex(componentType));
|
||||||
|
}
|
||||||
|
|
||||||
/***************************************
|
/***************************************
|
||||||
** Manage Components **
|
** Manage Components **
|
||||||
***************************************/
|
***************************************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user