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


Java SimpleBaseGameActivity类代码示例

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


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

示例1: onCreateResources

import org.andengine.ui.activity.SimpleBaseGameActivity; //导入依赖的package包/类
public static void onCreateResources(SimpleBaseGameActivity activity){

		// upper pipe		
		BitmapTextureAtlas upperPipeTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 130, 60, TextureOptions.BILINEAR);
		mUpperPipeTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(upperPipeTextureAtlas, activity, "pipeupper.png", 0, 0);
		upperPipeTextureAtlas.load();

		// upper pipe section	
		BitmapTextureAtlas upperPipeSectionTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 120, 1, TextureOptions.BILINEAR);
		mUpperPipeSectionTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(upperPipeSectionTextureAtlas, activity, "pipesectionupper.png", 0, 0);
		upperPipeSectionTextureAtlas.load();


		// lower pipe		
		BitmapTextureAtlas lowerPipeTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 130, 60, TextureOptions.BILINEAR);
		mLowerPipeTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(lowerPipeTextureAtlas, activity, "pipelower.png", 0, 0);
		lowerPipeTextureAtlas.load();

		// lower pipe section	
		BitmapTextureAtlas lowerPipeSectionTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 120, 1, TextureOptions.BILINEAR);
		mLowerPipeSectionTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(lowerPipeSectionTextureAtlas, activity, "pipesectionlower.png", 0, 0);
		lowerPipeSectionTextureAtlas.load();
	}
 
开发者ID:deano2390,项目名称:OpenFlappyBird,代码行数:24,代码来源:PipePair.java

示例2: onCreateResources

import org.andengine.ui.activity.SimpleBaseGameActivity; //导入依赖的package包/类
public static void onCreateResources(SimpleBaseGameActivity activity){

		// upper pipe		
		BitmapTextureAtlas upperPipeTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 130, 80, TextureOptions.DEFAULT);
		mUpperPipeTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(upperPipeTextureAtlas, activity, "pipetop.png", 0, 0);
		upperPipeTextureAtlas.load();

		// upper pipe section	
		BitmapTextureAtlas upperPipeSectionTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 120, 80, TextureOptions.DEFAULT);
		mUpperPipeSectionTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(upperPipeSectionTextureAtlas, activity, "pipesection.png", 0, 0);
		upperPipeSectionTextureAtlas.load();


		// lower pipe		
		BitmapTextureAtlas lowerPipeTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 130, 80, TextureOptions.DEFAULT);
		mLowerPipeTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(lowerPipeTextureAtlas, activity, "pipetop.png", 0, 0);
		lowerPipeTextureAtlas.load();

		// lower pipe section	
		//BitmapTextureAtlas lowerPipeSectionTextureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 120, 120, TextureOptions.BILINEAR);
		BitmapTextureAtlas lowerPipeSectionTextureAtlas =new BitmapTextureAtlas(activity.getTextureManager(), 120, 80, TextureOptions.DEFAULT);
		mLowerPipeSectionTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(lowerPipeSectionTextureAtlas, activity, "pipesection.png", 0, 0);
		lowerPipeSectionTextureAtlas.load();
		
		BitmapTextureAtlas coinTextureAtlas =new BitmapTextureAtlas(activity.getTextureManager(), 30, 30, TextureOptions.DEFAULT);
		coinTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(coinTextureAtlas, activity, "coin.png", 0, 0);
		coinTextureAtlas.load();
		
//		BitmapTextureAtlas lowerPipeSectionTextureAtlas2 = new BitmapTextureAtlas(activity.getTextureManager(), 120, 1, TextureOptions.BILINEAR);
//		mLowerPipeSectionTexture2 = BitmapTextureAtlasTextureRegionFactory.createFromAsset(lowerPipeSectionTextureAtlas2, activity, "pipesectionlower.png", 0, 0);
//		lowerPipeSectionTextureAtlas2.load();
		
	}
 
开发者ID:sunnyshah2894,项目名称:Flappy-Guy,代码行数:34,代码来源:PipePair.java

示例3: getManager

import org.andengine.ui.activity.SimpleBaseGameActivity; //导入依赖的package包/类
public static ResourceManager getManager(SimpleBaseGameActivity pContext) {
    INSTANCE.mContext = pContext;
    pContext.getVertexBufferObjectManager();
    return INSTANCE;
}
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:6,代码来源:ResourceManager.java

示例4: SceneManager

import org.andengine.ui.activity.SimpleBaseGameActivity; //导入依赖的package包/类
public SceneManager(SimpleBaseGameActivity context, ResourceManager resourceManager, ParallaxBackground parallaxBackground){
	this.mContext = context;	
	this.mResourceManager = resourceManager;
	this.mParallaxBackground = parallaxBackground;
}
 
开发者ID:deano2390,项目名称:OpenFlappyBird,代码行数:6,代码来源:SceneManager.java

示例5: ResourceManager

import org.andengine.ui.activity.SimpleBaseGameActivity; //导入依赖的package包/类
public ResourceManager(SimpleBaseGameActivity context){
	this.context = context;
}
 
开发者ID:deano2390,项目名称:OpenFlappyBird,代码行数:4,代码来源:ResourceManager.java


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