if (!isEnabled()) {
return;
}
it = entList.iterator();
while (it.hasNext()) {
BaseEntity ent = (BaseEntity) it.next();
if (ent.getAnimComponent() != null) {
if (ent.getAnimComponent().getCurAnim() != null) {
AnimInfo curAnimInfo = map.get(ent.getAnimComponent().getCurAnim());
AnimChannel channel = ent.getAnimComponent().getAnimControl().getChannel(AnimConf.UPPER_BODY);
if (GameState.getGameState() == GameState.RUNNING) {
if (channel.getAnimationName() != null ) {
if (!channel.getAnimationName().equals(curAnimInfo.name) || ent.getAnimComponent().getAnimControl().getChannel(AnimConf.UPPER_BODY).getSpeed() == 0f) {
ent.getAnimComponent().getAnimControl().getChannel(AnimConf.UPPER_BODY).setLoopMode(curAnimInfo.loop);
ent.getAnimComponent().getAnimControl().getChannel(AnimConf.UPPER_BODY).setSpeed(curAnimInfo.speed);
ent.getAnimComponent().getAnimControl().getChannel(AnimConf.UPPER_BODY).setAnim(curAnimInfo.name, curAnimInfo.blendTime);
}
}
}
}