Mais conteúdo relacionado
Semelhante a Google Play Game Servicesについて (20)
Google Play Game Servicesについて
- 7. iOS
Google+用のSDKとPlay
Game
Services用のSDKを組み込めば簡単に利用出来る
(マルチプレイヤー以外)Androidと同程度のライブラリが用意されている
//
Leaderboardの表示(ViewControllerはライブラリに含まれている)
-‐
(IBAcEon)showLeaderboard:
(UIBuon
*)sender
{
//
You
get
this
leaderboard
Id
from
the
Developer
Console
GPGLeaderboardController
*leadController
=
[[GPGLeaderboardController
alloc]
initWithLeaderboardId:@"abcde"];
leadController.leaderboardDelegate
=
self;
[self
presentModalViewController:leadController
animated:YES];
}
- 13. //
get
the
invitee
list
final
ArrayList<String>
invitees
=
data.getStringArrayListExtra(GamesClient.EXTRA_PLAYERS);
//
create
the
room
Log.d(TAG,
"CreaEng
room...");
RoomConfig.Builder
rtmConfigBuilder
=
RoomConfig.builder(this);
rtmConfigBuilder.addPlayersToInvite(invitees);
rtmConfigBuilder.setMessageReceivedListener(this);
rtmConfigBuilder.setRoomStatusUpdateListener(this);
if
(autoMatchCriteria
!=
null)
{
rtmConfigBuilder.setAutoMatchCriteria(autoMatchCriteria);
}
switchToScreen(R.id.screen_wait);
keepScreenOn();
resetGameVars();
getGamesClient().createRoom(rtmConfigBuilder.build());
Log.d(TAG,
"Room
created,
waiEng
for
it
to
be
ready...");
ユーザ選択AcEvityの結果からRoomを作成する。
Roomを作成する際に、ユーザーの増減やメッセージの受信を行う
Listenerを設定する。