AndEngine的第一个程序HelloWorld(二)

2014-11-24 09:12:22 · 作者: · 浏览: 4
und color needed as we have a fullscreen background sprite. */
this.mScene.setBackgroundEnabled(false);
this.mScene.getChildByIndex(LAYER_BACKGROUND).attachChild(
new Sprite(0, 0, this.mBackgroundTextureRegion, this
.getVertexBufferObjectManager()));

this.mHelloText=new Text(CAMERA_WIDTH/2 - 80, CAMERA_HEIGHT/2 - 16, this.mFont, "Hello World !", this.getVertexBufferObjectManager());
this.mHelloText.setBlendFunction(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);
this.mHelloText.setAlpha(0.6f);
this.mScene.getChildByIndex(LAYER_TEXT).attachChild(this.mHelloText);

return this.mScene;
}

}