当前位置: 首页>>代码示例>>Java>>正文


Java Camera.onDrawHUD方法代码示例

本文整理汇总了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);
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:8,代码来源:Engine.java

示例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();
	}
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:34,代码来源:SingleSceneSplitScreenEngine.java

示例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();
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:32,代码来源:DoubleSceneSplitScreenEngine.java

示例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);
}
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:8,代码来源:Engine.java

示例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();
	}
}
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:34,代码来源:SingleSceneSplitScreenEngine.java

示例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();
}
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:32,代码来源:DoubleSceneSplitScreenEngine.java


注:本文中的org.andengine.engine.camera.Camera.onDrawHUD方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。