onCreateScene出错

时间:2013-01-18 09:27:05

标签: android andengine

protected Scene onCreateScene() {
    // TODO Auto-generated method stub
    this.mEngine.registerUpdateHandler(new FPSLogger());
            this.myScene=new Scene();
            SpriteBackground myback=new SpriteBackground(new Sprite(0,0,CAMERA_WIDTH,CAMERA_HEIGHT, myBackGroundTextureRegion, this.getVertexBufferObjectManager()));
    myScene.setBackground(myback);
           myHandler.postDelayed(mStartVamp, 5000);
            return myScene;
}

private Runnable mStartVamp=new Runnable() {

    @Override
    public void run() {
        AnimatedSprite scrumSprite=new AnimatedSprite(CAMERA_WIDTH-20, CAMERA_HEIGHT/2,myScrumTiledTextureRegion, getVertexBufferObjectManager());

        scrumSprite.animate(500);
        scrumSprite.registerEntityModifier(new SequenceEntityModifier(new AlphaModifier(5, 0, 1),new MoveModifier(60, scrumSprite.getX(),20,scrumSprite.getY(),(CAMERA_HEIGHT/2))));
        myScene.attachChild(scrumSprite);
}

0 个答案:

没有答案