public <T extends SceneNodeComponent> void removeComponent(Class<T> componentType) { int typeId = ComponentType.findType(componentType); SceneNodeComponent component = _components.get(ComponentType.findBaseType(typeId)); if (component != null && isSubtype(typeId, component.componentType)) { component.destroy(); } }
public <T extends SceneNodeComponent> boolean hasComponent( Class<T> type, boolean includeInactive) { int typeId = ComponentType.findType(type); SceneNodeComponent value = _components.get(ComponentType.findBaseType(typeId)); return value != null && (includeInactive || value.isActive()) && isSubtype(typeId, value.componentType); }