Skip to content
yokoe edited this page Sep 14, 2010 · 5 revisions

概要

PANKIAの主な機能はこのPankiaNetクラスを通じて利用することができます。

クラスメソッド

イニシャライザ

+ (void)initWithGameKey:(NSString*)gameKey gameSecret:(NSString*)secret title:(NSString*)title delegate:(id)delegate;

PankiaNetを初期化します。通常はアプリケーションの起動直後に行ってください。
初期化と同時に、ゲームキーとシークレットを使ってPANKIAへの自動ログインも試みます。ログインに成功した場合はuserDidLogin:が呼ばれます。ユーザ登録が未完了の場合は、ユーザ登録画面が表示されます。

ダッシュボード関連

+ (void)setDashboardOrientation:( UIInterfaceOrientation)orientation;

ダッシュボードの方向を指定します。現在はUIInterfaceOrientationLandscapeLeftとUIInterfaceOrientationLandscapeRightに対応しています。

+ (void)launchDashboard;

ダッシュボードを表示します。
ダッシュボードが表示される時に、dashboardWillAppear, dashboardDidAppearが呼ばれます。
launchDashboardを呼んだ場合は、ダッシュボードのトップメニューが表示されますが、下記のメソッドを使用するとアチーブメント画面やリーダーボード等任意の画面を表示した状態でダッシュボードを表示させることができます。

+ (void)launchDashboardWithLeaderboardsView;
+ (void)launchDashboardWithAchievementsView;
+ (void)launchDashboardWithFindFriendsView;
+ (void)launchDashboardWithNearbyMatchView;
+ (void)launchDashboardWithInternetMatchView;
+ (void)launchDashboardWithSettingsView;
+ (void)launchDashboardWithEditProfileView;
+ (void)launchDashboardWithSecureAccountView;
+ (void)launchDashboardWithSwitchAccountView;
+ (void)launchDashboardWithMyProfileView;
+ (void)launchDashboardWithUsersProfileView:(NSString*)username;
+ (void)launchDashboardWithInvitedRoomsView;
+ (void)launchDashboardWithInternetMatchRoom:(PNRoom*)room;

+ (void)dismissDashboard;

ダッシュボードを閉じます。
ダッシュボードを閉じる時には、dashboardWillDisappear, dashboardDidDisappearが呼ばれます。

アチーブメント関連

+ (void)fetchAchievements;
+ (void)fetchUnlockedAchievements;
+ (void)unlockAchievement:(int)achievementId;
+ (void)unlockAchievements:(NSArray*)achievementsToUnlock;
+ (BOOL)isAchievementUnlocked:(int)achievementId;

リーダーボード関連

+ (void)fetchLeaderboards;
+ (void)fetchRankOnLeaderboard:(int)leaderboardId;
+ (void)fetchAllLeaderboardsRank;
+ (void)postScore:(long long int)score leaderboardId:(int)leaderboardId delta:(BOOL)delta;

その他

+ (BOOL)isLoggedIn;
+ (BOOL)isTwitterLinked;
+ (void)followUserByName:(NSString*)username;
+ (void)postTweet:(NSString*)tweet;

Clone this wiki locally