1

in cocos2d-x 2 when the time based tournament ends.I want to detect that what is rank of the player.So that i can detect that is the player winner or not.

1 Answers1

1

If you'd like to know the track the player's rank you can do on of the following things:

1) When the player leave (before you call "reportForfeitForCurrentTournament"). Place a TCP (reliable) message that player is leaving. This way all connected clients will know that this player has left the game.

2) Extend Nextpeer Cocos2d-x interface to to support the "nextpeerDidReceiveTournamentStatus" event. This event has an array of all players (sorted by score). For each player you can know the following details: a) The last known score b) If the player still player or reached the end c) If the player forfeited the game d) and much more such as the player name, image url etc.

Muddy Waters
  • 113
  • 9