Game Development Reference
In-Depth Information
Open the End actor in the Actor Editor. Drag and drop a ''Game Center ---- Post
Score'' behavior into the rule. The attribute to post is''game.Score.'' Enter the
Leaderboard ID. The screen should look similar to Figure 9-28.
Figure 9-28. Posting score when game is won
Showing the Scores
On the Home scene, add a button to show the Leaderboard with the highest
scores from all players across the world.
Create a new actor and double-click it to open the Actor Editor. Edit the actor
attributes with the parameters in Table 9-9.
Table 9-9. Leaderboards Actor Attributes
Name
Leaderboards
Size/Width
294
Size/Height
57
Click the Images tab to display the images resources and drag and drop
Leaderboard.png to the actor.
Open the actor in the Actor Editor. Create a new rule with the condition ''Actor
receives event''''touch'' is ''pressed.'' Then drag and drop a ''Game Center ----
Show Leaderboard'' behavior and key-in the Leaderboard ID and the period for
 
Search WWH ::




Custom Search