本文整理汇总了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);
}
示例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);
}
示例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();
}