NextpeerDelegate Protocol Reference
Conforms to | NSObject |
Declared in | NextpeerDelegate.h |
Tasks
-
– nextpeerDidTournamentStartWithDetails:
This method will be called when a tournament is about to start. The tournament start container will give you some details on the tournament which is about to be played. For example the tournament UUID, name and time.
required method -
– nextpeerDidTournamentEnd
This method is invoked whenever the current tournament has finished. In here you can place some cleanup code. For example, you can use this method to recycle the game scene.
required method -
– nextpeerSupportsTournamentWithId:
Use this function to tell the SDK whether you support the given tournament. This method is called once for each tournament uuid that is present in the dashboard. If this particular game version doesn’t support a certain tournament, use this function to tell the SDK to disable it.
-
– nextpeerNotSupportedShouldShowCustomError
This method will be called in case Nextpeer is not supported on the device.
-
– nextpeerWillTournamentStartWithDetails:
We will call it when the before the tournament will start (prior the dismissing the dashboard).
-
– nextpeerDashboardWillAppear
This is where you should pause your game.
-
– nextpeerDashboardDidAppear
This method is invoked when the dashboard has finished its animated transition and is now fully visible.
-
– nextpeerDashboardWillDisappear
This is where Cocoa based games should unpause and resume playback.
-
– nextpeerDashboardDidDisappear
This is where OpenGL games should unpause and resume playback.
-
– nextpeerDashboardDidReturnToGame
This method will be called when the player closes Nextpeer’s dashboard and returns to the game.
-
– shouldAllowInterGameScreen
Tells Nextpeer if the game wants to display its own screens immediately after the player taps the “Play Again” button and before the next game starts. If you implement this method, you must also implement [NextpeerDelegate nextpeerWillHideToShowInterGameScreen].
-
– nextpeerWillHideToShowInterGameScreen
Tells the game that Nextpeer will hide itself in order to allow the game to display a “inter-game” screen. Only relevant in conjunction with [NextpeerDelegate shouldAllowInterGameScreen].
Instance Methods
nextpeerDashboardDidAppear
This method is invoked when the dashboard has finished its animated transition and is now fully visible.
- (void)nextpeerDashboardDidAppear
Declared In
NextpeerDelegate.h
nextpeerDashboardDidDisappear
This is where OpenGL games should unpause and resume playback.
- (void)nextpeerDashboardDidDisappear
Declared In
NextpeerDelegate.h
nextpeerDashboardDidReturnToGame
This method will be called when the player closes Nextpeer’s dashboard and returns to the game.
- (void)nextpeerDashboardDidReturnToGame
Declared In
NextpeerDelegate.h
nextpeerDashboardWillAppear
This is where you should pause your game.
- (void)nextpeerDashboardWillAppear
Declared In
NextpeerDelegate.h
nextpeerDashboardWillDisappear
This is where Cocoa based games should unpause and resume playback.
- (void)nextpeerDashboardWillDisappear
Discussion
Warning: Since an exit animation will play, this will cause negative performance if your game
is rendering on an EAGLView. For OpenGL games, you should refresh your view once and
resume your game in [NextpeerDelegate nextpeerDashboardDidDisappear].
Declared In
NextpeerDelegate.h
nextpeerDidTournamentEnd
This method is invoked whenever the current tournament has finished. In here you can place some cleanup code. For example, you can use this method to recycle the game scene.
- (void)nextpeerDidTournamentEnd
Declared In
NextpeerDelegate.h
nextpeerDidTournamentStartWithDetails:
This method will be called when a tournament is about to start. The tournament start container will give you some details on the tournament which is about to be played. For example the tournament UUID, name and time.
- (void)nextpeerDidTournamentStartWithDetails:(NPTournamentStartDataContainer *)tournamentContainer
Parameters
- tournamentContainer
The descriptor object for the start of the tournament.
Declared In
NextpeerDelegate.h
nextpeerNotSupportedShouldShowCustomError
This method will be called in case Nextpeer is not supported on the device.
- (BOOL)nextpeerNotSupportedShouldShowCustomError
Return Value
YES we will not show our error view and let you the opportunity to intervene. Default is NO – we will show a UIAlertView.
Declared In
NextpeerDelegate.h
nextpeerSupportsTournamentWithId:
Use this function to tell the SDK whether you support the given tournament. This method is called once for each tournament uuid that is present in the dashboard. If this particular game version doesn’t support a certain tournament, use this function to tell the SDK to disable it.
- (BOOL)nextpeerSupportsTournamentWithId:(NSString *)tournamentUuid
Parameters
- tournamentUuid
The tournament ID, as set on the game dashboard.
Return Value
YES if you support this tournament and NO otherwise (default YES).
Declared In
NextpeerDelegate.h
nextpeerWillHideToShowInterGameScreen
Tells the game that Nextpeer will hide itself in order to allow the game to display a “inter-game” screen. Only relevant in conjunction with [NextpeerDelegate shouldAllowInterGameScreen].
- (void)nextpeerWillHideToShowInterGameScreen
Declared In
NextpeerDelegate.h
nextpeerWillTournamentStartWithDetails:
We will call it when the before the tournament will start (prior the dismissing the dashboard).
- (void)nextpeerWillTournamentStartWithDetails:(NPTournamentStartDataContainer *)tournamentContainer
Parameters
- tournamentContainer
The descriptor object for the start of the tournament.
Declared In
NextpeerDelegate.h
shouldAllowInterGameScreen
Tells Nextpeer if the game wants to display its own screens immediately after the player taps the “Play Again” button and before the next game starts. If you implement this method, you must also implement [NextpeerDelegate nextpeerWillHideToShowInterGameScreen].
- (BOOL)shouldAllowInterGameScreen
Return Value
YES if you allow showing the inter-game screen, NO otherwise.
Declared In
NextpeerDelegate.h