Difference between revisions of "Gaming"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
m |
||
Line 17: | Line 17: | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== Methods === | === Methods === | ||
− | [[Gaming.new]] '' | + | [[Gaming.new]] ''instantiate the Gaming plugin''<br/><!--GIDEROSMTD:Gaming.new(backend) instantiate the Gaming plugin--> |
[[Gaming:autoMatch]] <br/><!--GIDEROSMTD:Gaming:autoMatch()--> | [[Gaming:autoMatch]] <br/><!--GIDEROSMTD:Gaming:autoMatch()--> | ||
− | [[Gaming:deleteState]] ''remove the specified save/state'' <br/><!--GIDEROSMTD:Gaming:deleteState(key) remove the specified save/state--> | + | [[Gaming:deleteState]] ''remove the specified save/state''<br/><!--GIDEROSMTD:Gaming:deleteState(key) remove the specified save/state--> |
[[Gaming:getAllPlayers]] <br/><!--GIDEROSMTD:Gaming:getAllPlayers()--> | [[Gaming:getAllPlayers]] <br/><!--GIDEROSMTD:Gaming:getAllPlayers()--> | ||
− | [[Gaming:getPlayerId]] '' | + | [[Gaming:getPlayerId]] ''get the id of current player''<br/><!--GIDEROSMTD:Gaming:getPlayerId() get the id of current player--> |
[[Gaming:getPlayerInfo]] <br/><!--GIDEROSMTD:Gaming:getPlayerInfo()--> | [[Gaming:getPlayerInfo]] <br/><!--GIDEROSMTD:Gaming:getPlayerInfo()--> | ||
− | [[Gaming:getPlayerName]] '' | + | [[Gaming:getPlayerName]] ''get the name of current player''<br/><!--GIDEROSMTD:Gaming:getPlayerName() get the name of current player--> |
− | [[Gaming:getPlayerPicture]] '' | + | [[Gaming:getPlayerPicture]] ''get the profile picture of current player''<br/><!--GIDEROSMTD:Gaming:getPlayerPicture() get the profile picture of current player--> |
− | [[Gaming:getPlayerScore]] '' | + | [[Gaming:getPlayerScore]] ''get the score of current player''<br/><!--GIDEROSMTD:Gaming:getPlayerScore() get the score of current player--> |
− | [[Gaming:incrementAchievement]] '' | + | [[Gaming:incrementAchievement]] ''increment the progress toward an achievement''<br/><!--GIDEROSMTD:Gaming:incrementAchievement(achievementId,numSteps,immediate) increment the progress toward an achievement--> |
[[Gaming:invitePlayers]] <br/><!--GIDEROSMTD:Gaming:invitePlayers()--> | [[Gaming:invitePlayers]] <br/><!--GIDEROSMTD:Gaming:invitePlayers()--> | ||
− | [[Gaming:isLoggedIn]] '' | + | [[Gaming:isLoggedIn]] ''return the login state in Gaming service''<br/><!--GIDEROSMTD:Gaming:isLoggedIn() return the login state in Gaming service--> |
[[Gaming:joinRoom]] <br/><!--GIDEROSMTD:Gaming:joinRoom()--> | [[Gaming:joinRoom]] <br/><!--GIDEROSMTD:Gaming:joinRoom()--> | ||
− | [[Gaming:loadAchievements]] '' | + | [[Gaming:loadAchievements]] ''load all achievements''<br/><!--GIDEROSMTD:Gaming:loadAchievements() load all achievements--> |
− | [[Gaming:loadPlayerCenteredScores]] '' | + | [[Gaming:loadPlayerCenteredScores]] ''load a leaderboard centered on the player''<br/><!--GIDEROSMTD:Gaming:loadPlayerCenteredScores(leaderboardId,timeSpan,collection,maxEntries) load a leaderboard centered on the player--> |
− | [[Gaming:loadScores]] '' | + | [[Gaming:loadScores]] ''load a leaderboard''<br/><!--GIDEROSMTD:Gaming:loadScores(leaderboardId,timeSpan,collection,maxEntries) load a leaderboard--> |
− | [[Gaming:loadState]] '' | + | [[Gaming:loadState]] ''load a save/state''<br/><!--GIDEROSMTD:Gaming:loadState(key) load a save/state--> |
− | [[Gaming:login]] '' | + | [[Gaming:login]] ''log in the Gaming service''<br/><!--GIDEROSMTD:Gaming:login() log in the Gaming service--> |
− | [[Gaming:logout]] '' | + | [[Gaming:logout]] ''log out of the gaming service''<br/><!--GIDEROSMTD:Gaming:logout() log out of the gaming service--> |
− | [[Gaming:reportAchievement]] '' | + | [[Gaming:reportAchievement]] ''report an achievement progress''<br/><!--GIDEROSMTD:Gaming:reportAchievement(achievementId,numSteps,immediate) report an achievement progress--> |
− | [[Gaming:reportScore]] '' | + | [[Gaming:reportScore]] ''report a new score''<br/><!--GIDEROSMTD:Gaming:reportScore(leaderboardId,score,immediate) report a new score--> |
− | [[Gaming:resolveState]] '' | + | [[Gaming:resolveState]] ''resolve a save/state conflict''<br/><!--GIDEROSMTD:Gaming:resolveState(key,version,data) resolve a save/state conflict--> |
− | [[Gaming:revealAchievement]] '' | + | [[Gaming:revealAchievement]] ''reveal an achievement''<br/><!--GIDEROSMTD:Gaming:revealAchievement(achievementId,immediate) reveal an achievement--> |
[[Gaming:sendTo]] <br/><!--GIDEROSMTD:Gaming:sendTo()--> | [[Gaming:sendTo]] <br/><!--GIDEROSMTD:Gaming:sendTo()--> | ||
[[Gaming:sendToAll]] <br/><!--GIDEROSMTD:Gaming:sendToAll()--> | [[Gaming:sendToAll]] <br/><!--GIDEROSMTD:Gaming:sendToAll()--> | ||
− | [[Gaming:showAchievements]] '' | + | [[Gaming:showAchievements]] ''show the achievements''<br/><!--GIDEROSMTD:Gaming:showAchievements() show the achievements--> |
[[Gaming:showInvitations]] <br/><!--GIDEROSMTD:Gaming:showInvitations()--> | [[Gaming:showInvitations]] <br/><!--GIDEROSMTD:Gaming:showInvitations()--> | ||
− | [[Gaming:showLeaderboard]] '' | + | [[Gaming:showLeaderboard]] ''show a leaderboard''<br/><!--GIDEROSMTD:Gaming:showLeaderboard(leaderboardId) show a leaderboard--> |
− | [[Gaming:showWaitingRoom]] '' | + | [[Gaming:showWaitingRoom]] ''display the waiting room''<br/><!--GIDEROSMTD:Gaming:showWaitingRoom() display the waiting room--> |
− | [[Gaming:updateState]] '' | + | [[Gaming:updateState]] ''update a save/state''<br/><!--GIDEROSMTD:Gaming:updateState(key,data,immediate) update a save/state--> |
|style="width: 50%; vertical-align:top;"| | |style="width: 50%; vertical-align:top;"| |
Latest revision as of 21:42, 7 December 2023
Supported platforms:
Available since: Gideros 2012.09
Description
The Gaming class currently supports:
- Gaming.new("googleplay") -- Android
- Gaming.new("gamekit") -- iOS
require("gaming")
Loading the gaming module also creates a global class Gaming.