本文整理汇总了Java中org.andengine.BuildConfig.DEBUG属性的典型用法代码示例。如果您正苦于以下问题:Java BuildConfig.DEBUG属性的具体用法?Java BuildConfig.DEBUG怎么用?Java BuildConfig.DEBUG使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.andengine.BuildConfig
的用法示例。
在下文中一共展示了BuildConfig.DEBUG属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onUpdate
@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();
}
}
示例2: onSurfaceCreated
@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();
}
}
}
示例3: onCreate
@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();
}
示例4: ETC1Texture
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);
}
}
示例5: onUpdate
@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();
}
}
示例6: onCreate
@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();
}
示例7: onSurfaceCreated
@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();
}
}
}
示例8: obtainPoolItem
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;
}
示例9: onDestroy
@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;
}
示例10: onSurfaceCreated
@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();
}
}
}
示例11: onDestroy
@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;
}
示例12: onResume
@Override
protected synchronized void onResume() {
if (BuildConfig.DEBUG) {
Debug.d(this.getClass().getSimpleName() + ".onResume" + " @(Thread: '" + Thread.currentThread().getName() + "')");
}
super.onResume();
this.acquireWakeLock();
this.mRenderSurfaceView.onResume();
}
示例13: onLogFPS
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));
}
}
示例14: onPauseGame
@Override
public synchronized void onPauseGame() {
if (BuildConfig.DEBUG) {
Debug.d(this.getClass().getSimpleName() + ".onPauseGame" + " @(Thread: '" + Thread.currentThread().getName() + "')");
}
this.mGamePaused = true;
this.mEngine.stop();
}
示例15: onReloadResources
@Override
public void onReloadResources() {
if (BuildConfig.DEBUG) {
Debug.d(this.getClass().getSimpleName() + ".onReloadResources" + " @(Thread: '" + Thread.currentThread().getName() + "')");
}
this.mEngine.onReloadResources();
}