}
private void alterDescendents(float deltaTheta, SingleTypeComponentList descendents){
if(descendents != null && shouldUpdateDescendents()){
for(Component d:descendents){
ParentComponent p = (ParentComponent) d;
Component oc = p.getChildByType(getType());
PositionComponent pos = (PositionComponent) p.getChildByType(PositionComponent.class.getName());
if(pos != null){
PositionComponent centrePos = (PositionComponent) getSiblingByType(PositionComponent.class.getName());
if(centrePos != null){
pos.setVector(VectorUtil.rotateAround(pos.getVector(), centrePos.getVector(), deltaTheta));
}
}
if(oc != null){
OrientationComponent o = (OrientationComponent) oc;
if(o.shouldUpdateWithAncestor()){
o.setValue(o.getValue()+deltaTheta);
}
}else{
alterDescendents(deltaTheta, p.getChildrenByType(ParentComponent.class.getName()));
}
}
}
}