我试图只对一个精灵进行动画,但它却被动画了两次,有人可以帮我吗??这是代码:
CuttingLineEffect(float x, float y, TiledTextureRegion line_region)
{
super(x, y, line_region);
this.animate(60, 1);
this.mPhysicsHandler = new PhysicsHandler(this);
this.registerUpdateHandler(this.mPhysicsHandler);
this.setPosition(x-this.getWidth()/2-50+this.getWidth()/2,y+50);
}
@Override
protected void onManagedUpdate(float pSecondsElapsed) {
if(!set)
{
MainMenu.LineList.add(this);
set = true;
}
if(!this.isAnimationRunning() && !time_to_unload)
{
time_to_unload = true;
}
super.onManagedUpdate(pSecondsElapsed);
};