本文整理汇总了Java中org.andengine.engine.camera.Camera.onDrawHUD方法的典型用法代码示例。如果您正苦于以下问题:Java Camera.onDrawHUD方法的具体用法?Java Camera.onDrawHUD怎么用?Java Camera.onDrawHUD使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.andengine.engine.camera.Camera
的用法示例。
在下文中一共展示了Camera.onDrawHUD方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onDrawScene
import org.andengine.engine.camera.Camera; //导入方法依赖的package包/类
protected void onDrawScene(final GLState pGLState, final Camera pCamera) {
if (this.mScene != null) {
this.mScene.onDraw(pGLState, pCamera);
}
pCamera.onDrawHUD(pGLState);
}
示例2: onDrawScene
import org.andengine.engine.camera.Camera; //导入方法依赖的package包/类
@Override
protected void onDrawScene(final GLState pGLState, final Camera pFirstCamera) {
if (super.mScene != null) {
final Camera secondCamera = this.getSecondCamera();
final int surfaceWidth = this.mSurfaceWidth;
final int surfaceWidthHalf = surfaceWidth >> 1;
final int surfaceHeight = this.mSurfaceHeight;
pGLState.enableScissorTest();
/* First Screen. With first camera, on the left half of the screens width. */
{
GLES20.glScissor(0, 0, surfaceWidthHalf, surfaceHeight);
GLES20.glViewport(0, 0, surfaceWidthHalf, surfaceHeight);
super.mScene.onDraw(pGLState, pFirstCamera);
pFirstCamera.onDrawHUD(pGLState);
}
/* Second Screen. With second camera, on the right half of the screens width. */
{
GLES20.glScissor(surfaceWidthHalf, 0, surfaceWidthHalf, surfaceHeight);
GLES20.glViewport(surfaceWidthHalf, 0, surfaceWidthHalf, surfaceHeight);
super.mScene.onDraw(pGLState, secondCamera);
secondCamera.onDrawHUD(pGLState);
}
pGLState.disableScissorTest();
}
}
示例3: onDrawScene
import org.andengine.engine.camera.Camera; //导入方法依赖的package包/类
@Override
protected void onDrawScene(final GLState pGLState, final Camera pFirstCamera) {
final Camera secondCamera = this.getSecondCamera();
final int surfaceWidth = this.mSurfaceWidth;
final int surfaceWidthHalf = surfaceWidth >> 1;
final int surfaceHeight = this.mSurfaceHeight;
pGLState.enableScissorTest();
/* First Screen. With first camera, on the left half of the screens width. */
if (super.mScene != null) {
GLES20.glScissor(0, 0, surfaceWidthHalf, surfaceHeight);
GLES20.glViewport(0, 0, surfaceWidthHalf, surfaceHeight);
super.mScene.onDraw(pGLState, pFirstCamera);
pFirstCamera.onDrawHUD(pGLState);
}
/* Second Screen. With second camera, on the right half of the screens width. */
if (this.mSecondScene != null) {
GLES20.glScissor(surfaceWidthHalf, 0, surfaceWidthHalf, surfaceHeight);
GLES20.glViewport(surfaceWidthHalf, 0, surfaceWidthHalf, surfaceHeight);
this.mSecondScene.onDraw(pGLState, secondCamera);
secondCamera.onDrawHUD(pGLState);
}
pGLState.disableScissorTest();
}
示例4: onDrawScene
import org.andengine.engine.camera.Camera; //导入方法依赖的package包/类
protected void onDrawScene(final GLState pGLState, final Camera pCamera) {
if(this.mScene != null) {
this.mScene.onDraw(pGLState, pCamera);
}
pCamera.onDrawHUD(pGLState);
}
示例5: onDrawScene
import org.andengine.engine.camera.Camera; //导入方法依赖的package包/类
@Override
protected void onDrawScene(final GLState pGLState, final Camera pFirstCamera) {
if(super.mScene != null) {
final Camera secondCamera = this.getSecondCamera();
final int surfaceWidth = this.mSurfaceWidth;
final int surfaceWidthHalf = surfaceWidth >> 1;
final int surfaceHeight = this.mSurfaceHeight;
pGLState.enableScissorTest();
/* First Screen. With first camera, on the left half of the screens width. */
{
GLES20.glScissor(0, 0, surfaceWidthHalf, surfaceHeight);
GLES20.glViewport(0, 0, surfaceWidthHalf, surfaceHeight);
super.mScene.onDraw(pGLState, pFirstCamera);
pFirstCamera.onDrawHUD(pGLState);
}
/* Second Screen. With second camera, on the right half of the screens width. */
{
GLES20.glScissor(surfaceWidthHalf, 0, surfaceWidthHalf, surfaceHeight);
GLES20.glViewport(surfaceWidthHalf, 0, surfaceWidthHalf, surfaceHeight);
super.mScene.onDraw(pGLState, secondCamera);
secondCamera.onDrawHUD(pGLState);
}
pGLState.disableScissorTest();
}
}
示例6: onDrawScene
import org.andengine.engine.camera.Camera; //导入方法依赖的package包/类
@Override
protected void onDrawScene(final GLState pGLState, final Camera pFirstCamera) {
final Camera secondCamera = this.getSecondCamera();
final int surfaceWidth = this.mSurfaceWidth;
final int surfaceWidthHalf = surfaceWidth >> 1;
final int surfaceHeight = this.mSurfaceHeight;
pGLState.enableScissorTest();
/* First Screen. With first camera, on the left half of the screens width. */
if(super.mScene != null) {
GLES20.glScissor(0, 0, surfaceWidthHalf, surfaceHeight);
GLES20.glViewport(0, 0, surfaceWidthHalf, surfaceHeight);
super.mScene.onDraw(pGLState, pFirstCamera);
pFirstCamera.onDrawHUD(pGLState);
}
/* Second Screen. With second camera, on the right half of the screens width. */
if(this.mSecondScene != null) {
GLES20.glScissor(surfaceWidthHalf, 0, surfaceWidthHalf, surfaceHeight);
GLES20.glViewport(surfaceWidthHalf, 0, surfaceWidthHalf, surfaceHeight);
this.mSecondScene.onDraw(pGLState, secondCamera);
secondCamera.onDrawHUD(pGLState);
}
pGLState.disableScissorTest();
}