• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java BuildConfig类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.andengine.BuildConfig的典型用法代码示例。如果您正苦于以下问题:Java BuildConfig类的具体用法?Java BuildConfig怎么用?Java BuildConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BuildConfig类属于org.andengine包,在下文中一共展示了BuildConfig类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onUpdate

import org.andengine.BuildConfig; //导入依赖的package包/类
@Override
public void onUpdate(final float pSecondsElapsed) {
	this.mFramesLeft--;

	final float[] frameLengths = this.mFrameLengths;
	if (this.mFramesLeft >= 0) {
		frameLengths[this.mFramesLeft] = pSecondsElapsed;
	} else {
		if (BuildConfig.DEBUG) {
			for (int i = frameLengths.length - 1; i >= 0; i--) {
				Debug.d("Elapsed: " + frameLengths[i]);
			}
		}

		throw new RuntimeException();
	}
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:18,代码来源:FrameCountCrasher.java


示例2: onCreate

import org.andengine.BuildConfig; //导入依赖的package包/类
@Override
protected void onCreate(final Bundle pSavedInstanceState) {
	if (BuildConfig.DEBUG) {
		Debug.d(this.getClass().getSimpleName() + ".onCreate" + " @(Thread: '" + Thread.currentThread().getName() + "')");
	}

	super.onCreate(pSavedInstanceState);

	this.mGamePaused = true;

	this.mEngine = this.onCreateEngine(this.onCreateEngineOptions());
	this.mEngine.startUpdateThread();

	this.applyEngineOptions();

	this.onSetContentView();
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:18,代码来源:BaseGameActivity.java


示例3: onSurfaceCreated

import org.andengine.BuildConfig; //导入依赖的package包/类
@Override
public synchronized void onSurfaceCreated(final GLState pGLState) {
	if (BuildConfig.DEBUG) {
		Debug.d(this.getClass().getSimpleName() + ".onSurfaceCreated" + " @(Thread: '" + Thread.currentThread().getName() + "')");
	}

	if (this.mGameCreated) {
		this.onReloadResources();

		if (this.mGamePaused && this.mGameCreated && !this.isFinishing()) {
			this.onResumeGame();
		}
	} else {
		if (this.mCreateGameCalled) {
			this.mOnReloadResourcesScheduled = true;
		} else {
			this.mCreateGameCalled = true;
			this.onCreateGame();
		}
	}
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:22,代码来源:BaseGameActivity.java


示例4: onDestroy

import org.andengine.BuildConfig; //导入依赖的package包/类
@Override
protected void onDestroy() {
	if (BuildConfig.DEBUG) {
		Debug.d(this.getClass().getSimpleName() + ".onDestroy" + " @(Thread: '" + Thread.currentThread().getName() + "')");
	}

	super.onDestroy();

	this.mEngine.onDestroy();

	try {
		this.onDestroyResources();
	} catch (final Throwable pThrowable) {
		Debug.e(this.getClass().getSimpleName() + ".onDestroyResources failed." + " @(Thread: '" + Thread.currentThread().getName() + "')", pThrowable);
	}

	this.onGameDestroyed();

	this.mEngine = null;
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:21,代码来源:BaseGameActivity.java


示例5: ETC1Texture

import org.andengine.BuildConfig; //导入依赖的package包/类
public ETC1Texture(final TextureManager pTextureManager, final TextureOptions pTextureOptions, final ITextureStateListener pTextureStateListener) throws IOException {
	super(pTextureManager, PixelFormat.RGB_565, pTextureOptions, pTextureStateListener);

	InputStream inputStream = null;
	try {
		inputStream = this.getInputStream();

		this.mETC1TextureHeader = new ETC1TextureHeader(StreamUtils.streamToBytes(inputStream, ETC1.ETC_PKM_HEADER_SIZE));

		if (BuildConfig.DEBUG) {
			if (!(MathUtils.isPowerOfTwo(this.mETC1TextureHeader.mWidth) && MathUtils.isPowerOfTwo(this.mETC1TextureHeader.mHeight))) {
				Debug.w("ETC1 textures with NPOT sizes can cause a crash on PowerVR GPUs!");
			}
		}
	} finally {
		StreamUtils.close(inputStream);
	}
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:19,代码来源:ETC1Texture.java


示例6: obtainPoolItem

import org.andengine.BuildConfig; //导入依赖的package包/类
public synchronized T obtainPoolItem() {
	final T item;

	if (this.mAvailableItems.size() > 0) {
		item = this.mAvailableItems.remove(this.mAvailableItems.size() - 1);
	} else {
		if (this.mGrowth == 1 || this.mAvailableItemCountMaximum == 0) {
			item = this.onHandleAllocatePoolItem();
		} else {
			this.batchAllocatePoolItems(this.mGrowth);
			item = this.mAvailableItems.remove(this.mAvailableItems.size() - 1);
		}
		if (BuildConfig.DEBUG) {
			Debug.v(this.getClass().getName() + "<" + item.getClass().getSimpleName() +"> was exhausted, with " + this.mUnrecycledItemCount + " item not yet recycled. Allocated " + this.mGrowth + " more.");
		}
	}
	this.onHandleObtainItem(item);

	this.mUnrecycledItemCount++;
	return item;
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:22,代码来源:GenericPool.java


示例7: onUpdate

import org.andengine.BuildConfig; //导入依赖的package包/类
@Override
public void onUpdate(final float pSecondsElapsed) {
	this.mFramesLeft--;

	final float[] frameLengths = this.mFrameLengths;
	if(this.mFramesLeft >= 0) {
		frameLengths[this.mFramesLeft] = pSecondsElapsed;
	} else {
		if(BuildConfig.DEBUG) {
			for(int i = frameLengths.length - 1; i >= 0; i--) {
				Debug.d("Elapsed: " + frameLengths[i]);
			}
		}

		throw new RuntimeException();
	}
}
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:18,代码来源:FrameCountCrasher.java


示例8: onCreate

import org.andengine.BuildConfig; //导入依赖的package包/类
@Override
protected void onCreate(final Bundle pSavedInstanceState) {
	if(BuildConfig.DEBUG) {
		Debug.d(this.getClass().getSimpleName() + ".onCreate" + " @(Thread: '" + Thread.currentThread().getName() + "')");
	}

	super.onCreate(pSavedInstanceState);

	this.mGamePaused = true;

	this.mEngine = this.onCreateEngine(this.onCreateEngineOptions());
	this.mEngine.startUpdateThread();

	this.applyEngineOptions();

	this.onSetContentView();
}
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:18,代码来源:BaseGameActivity.java


示例9: onSurfaceCreated

import org.andengine.BuildConfig; //导入依赖的package包/类
@Override
public synchronized void onSurfaceCreated(final GLState pGLState) {
	if(BuildConfig.DEBUG) {
		Debug.d(this.getClass().getSimpleName() + ".onSurfaceCreated" + " @(Thread: '" + Thread.currentThread().getName() + "')");
	}

	if(this.mGameCreated) {
		this.onReloadResources();

		if(this.mGamePaused && this.mGameCreated) {
			this.onResumeGame();
		}
	} else {
		if(this.mCreateGameCalled) {
			this.mOnReloadResourcesScheduled = true;
		} else {
			this.mCreateGameCalled = true;
			this.onCreateGame();
		}
	}
}
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:22,代码来源:BaseGameActivity.java


示例10: onDestroy

import org.andengine.BuildConfig; //导入依赖的package包/类
@Override
protected void onDestroy() {
	if(BuildConfig.DEBUG) {
		Debug.d(this.getClass().getSimpleName() + ".onDestroy" + " @(Thread: '" + Thread.currentThread().getName() + "')");
	}

	super.onDestroy();

	this.mEngine.onDestroy();

	try {
		this.onDestroyResources();
	} catch (final Throwable pThrowable) {
		Debug.e(this.getClass().getSimpleName() + ".onDestroyResources failed." + " @(Thread: '" + Thread.currentThread().getName() + "')", pThrowable);
	}

	this.onGameDestroyed();

	this.mEngine = null;
}
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:21,代码来源:BaseGameActivity.java


示例11: obtainPoolItem

import org.andengine.BuildConfig; //导入依赖的package包/类
public synchronized T obtainPoolItem() {
	final T item;

	if(this.mAvailableItems.size() > 0) {
		item = this.mAvailableItems.remove(this.mAvailableItems.size() - 1);
	} else {
		if(this.mGrowth == 1 || this.mAvailableItemCountMaximum == 0) {
			item = this.onHandleAllocatePoolItem();
		} else {
			this.batchAllocatePoolItems(this.mGrowth);
			item = this.mAvailableItems.remove(this.mAvailableItems.size() - 1);
		}
		if(BuildConfig.DEBUG) {
			Debug.v(this.getClass().getName() + "<" + item.getClass().getSimpleName() +"> was exhausted, with " + this.mUnrecycledItemCount + " item not yet recycled. Allocated " + this.mGrowth + " more.");
		}
	}
	this.onHandleObtainItem(item);

	this.mUnrecycledItemCount++;
	return item;
}
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:22,代码来源:GenericPool.java


示例12: onSurfaceCreated

import org.andengine.BuildConfig; //导入依赖的package包/类
@Override
public synchronized void onSurfaceCreated(final GLState pGLState) {
	if (BuildConfig.DEBUG) {
		Debug.d(this.getClass().getSimpleName() + ".onSurfaceCreated" + " @(Thread: '" + Thread.currentThread().getName() + "')");
	}

	if (this.mGameCreated) {
		this.onReloadResources();

		if (this.mGamePaused && this.mGameCreated) {
			this.onResumeGame();
		}
	} else {
		if (this.mCreateGameCalled) {
			this.mOnReloadResourcesScheduled = true;
		} else {
			this.mCreateGameCalled = true;
			this.onCreateGame();
		}
	}
}
 
开发者ID:delight-im,项目名称:NationSoccer,代码行数:22,代码来源:BaseGameActivity.java


示例13: onLogFPS

import org.andengine.BuildConfig; //导入依赖的package包/类
protected void onLogFPS() {
	if (BuildConfig.DEBUG) {
		final float framesPerSecond = this.mFrames / this.mSecondsElapsed;
		final float shortestFrameInMilliseconds = this.mShortestFrame * TimeConstants.MILLISECONDS_PER_SECOND;
		final float longestFrameInMilliseconds = this.mLongestFrame * TimeConstants.MILLISECONDS_PER_SECOND;

		Debug.log(this.mDebugLevel, String.format("FPS: %.2f (MIN: %.0f ms | MAX: %.0f ms)", framesPerSecond, shortestFrameInMilliseconds, longestFrameInMilliseconds));
	}
}
 
开发者ID:ArturVasilov,项目名称:AndroidCourses,代码行数:10,代码来源:FPSLogger.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Chain类代码示例发布时间:2022-05-23
下一篇:
Java PanelDefinition类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap