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


Java BuildConfig.DEBUG属性代码示例

本文整理汇总了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();
	}
}
 
开发者ID:mediamonks,项目名称:tilt-game-android,代码行数:17,代码来源:FrameCountCrasher.java

示例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();
		}
	}
}
 
开发者ID:mediamonks,项目名称:tilt-game-android,代码行数:21,代码来源:BaseGameActivity.java

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

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

示例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();
	}
}
 
开发者ID:Phonbopit,项目名称:30-android-libraries-in-30-days,代码行数:17,代码来源:FrameCountCrasher.java

示例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();
}
 
开发者ID:Phonbopit,项目名称:30-android-libraries-in-30-days,代码行数:17,代码来源:BaseGameActivity.java

示例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();
		}
	}
}
 
开发者ID:Phonbopit,项目名称:30-android-libraries-in-30-days,代码行数:21,代码来源:BaseGameActivity.java

示例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;
}
 
开发者ID:Phonbopit,项目名称:30-android-libraries-in-30-days,代码行数:21,代码来源:GenericPool.java

示例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;
}
 
开发者ID:Phonbopit,项目名称:30-android-libraries-in-30-days,代码行数:20,代码来源:BaseGameActivity.java

示例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();
		}
	}
}
 
开发者ID:delight-im,项目名称:NationSoccer,代码行数:21,代码来源:BaseGameActivity.java

示例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;
}
 
开发者ID:delight-im,项目名称:NationSoccer,代码行数:20,代码来源:BaseGameActivity.java

示例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();
}
 
开发者ID:mediamonks,项目名称:tilt-game-android,代码行数:11,代码来源:BaseGameActivity.java

示例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));
	}
}
 
开发者ID:mediamonks,项目名称:tilt-game-android,代码行数:9,代码来源:FPSLogger.java

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

示例15: onReloadResources

@Override
public void onReloadResources() {
	if (BuildConfig.DEBUG) {
		Debug.d(this.getClass().getSimpleName() + ".onReloadResources" + " @(Thread: '" + Thread.currentThread().getName() + "')");
	}

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


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