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


Java GameHelperListener类代码示例

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


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

示例1: onCreate

import com.google.example.games.basegameutils.GameHelper.GameHelperListener; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	
	_gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES);
	_gameHelper.enableDebugLog(false);

	GameHelperListener gameHelperListener = new GameHelper.GameHelperListener()
	{
		@Override
		public void onSignInSucceeded() {
		}

		@Override
		public void onSignInFailed() {
		}
	};

	_gameHelper.setup(gameHelperListener);
	
	AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
	config.useAccelerometer = false;
	config.useCompass = false;
	initialize(new CDGame(this, "Touch", false), config);
}
 
开发者ID:buzzbyte,项目名称:CatchDROP,代码行数:26,代码来源:AndroidLauncher.java

示例2: onCreate

import com.google.example.games.basegameutils.GameHelper.GameHelperListener; //导入依赖的package包/类
@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		//		 Create the GameHelper
		_gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES);
		_gameHelper.enableDebugLog(false);

		GameHelperListener gameHelperListener = new GameHelper.GameHelperListener() {

			@Override
			public void onSignInSucceeded() {
				// TODO Auto-generated method stub

			}

			@Override
			public void onSignInFailed() {
				// TODO Auto-generated method stub

			}
		};

		_gameHelper.setup(gameHelperListener);
		
//		signIn();
		
		Intent serviceIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND");
		serviceIntent.setPackage("com.android.vending");
		bindService(serviceIntent, mServiceConn, Context.BIND_AUTO_CREATE);
//		queryPurchases();
		
		AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
		config.useImmersiveMode = true;
		initialize(new Runners(this), config);
	}
 
开发者ID:RyanMan56,项目名称:Runners,代码行数:37,代码来源:AndroidLauncher.java

示例3: onCreate

import com.google.example.games.basegameutils.GameHelper.GameHelperListener; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);

	requestWindowFeature(Window.FEATURE_NO_TITLE);
	getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
			WindowManager.LayoutParams.FLAG_FULLSCREEN);
	setContentView(R.layout.activity_main);
	
	mHelper = new GameHelper(this, GameHelper.CLIENT_ALL);
	mHelper.enableDebugLog(true, "GameHelper");
	mHelper.setMaxAutoSignInAttempts(0);
	
	mHelper.setup(new GameHelperListener() {
		@Override
		public void onSignInSucceeded() {
		}
		@Override
		public void onSignInFailed() {
		}
	});
	
	gamesPlayed = 0;
	
	Display display = getWindowManager().getDefaultDisplay();
	screenWidth = display.getWidth();
	screenHeight = display.getHeight();
	initializeFlipViews();
	
	loadGameState();
	
	initializeDrawables();
	levelFactory = getFactory(currentDifficulty);
	playingLevel = null;
	getViewsRefferences();
	nextLevel();
	initializeViews();
	
	saveGameState();
	loadUIState();
	
	Log.e(TAG, "onCreate");
	Log.e(TAG, playingLevel.getGameNum());
	
	setFlipViewsDrawables(playingLevel.getGameNum());
	movesRemaining = playingLevel.getMinMoves();
	saveUIState();
}
 
开发者ID:gorjanz,项目名称:numbers-game,代码行数:49,代码来源:ClassicModeActivity.java


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