BodyShadeImage= new Image(BodyShadeTexture);BodyShadeImage.setPosition(AssetsHelper.convertWidth(24),AssetsHelper.convertHeight(-68-73));Grp.addActor(BodyShadeImage);
ui.addActor(Grp);
public void AddLstr()
{
i++;
Action completeAction = new Action(){
public boolean act( float delta ) {
// System.out.println("i>>> "+i);
//if(i%3==0)
{
AddLstr();
}
return true;
}
};
Grp.addAction(Actions.sequence(Actions.moveBy(Grp.getX(),Grp.getY()+AssetsHelper.convertHeight(5),5f),completeAction));
//Grp1.addAction(Actions.moveBy(Grp.getX(),Grp.getY()+AssetsHelper.convertHeight(68),2f));
for(int i=0;i<PartsActual.length;i++)
{
PartsActual[i].addAction(Actions.moveBy(Grp.getX(),Grp.getY()+AssetsHelper.convertHeight(5),5f));
}
System.out.println("Grp.getY()"+Grp.getY());
}
这是我的代码;用于将组移动到固定位置。实际上我正在以5像素移动组;但是当我检查组位置时。我的偏差很大。所以群体运动不统一。任何人都可以帮我解决这个问题。