如何在AndEngine中使用SequenceModifier

时间:2015-10-24 12:44:53

标签: andengine

我正在使用AndEngine进行动画。我想在顺序模式下使用Modifier。

final float centerX = (BallShakeActivity.CAMERA_WIDTH - this.mFaceTextureRegion.getWidth()) / 2;
        final float centerY = (BallShakeActivity.CAMERA_HEIGHT - this.mFaceTextureRegion.getHeight()) / 2;
         ball = new AnimatedSprite(centerX, centerY, this.mFaceTextureRegion, this.getVertexBufferObjectManager());
        ball.animate(50);
        scene.attachChild(ball);

    MoveModifier modifier =  new MoveModifier(10,CAMERA_WIDTH ,CAMERA_HEIGHT/2, 0,CAMERA_HEIGHT );
    ball.registerEntityModifier(modifier);

0 个答案:

没有答案