Gaming

From GiderosMobile
(Redirected from Category:Gaming)

Supported platforms: Platform android.pngPlatform ios.png
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.

Methods

Gaming.new instantiate the Gaming plugin
Gaming:autoMatch
Gaming:deleteState remove the specified save/state
Gaming:getAllPlayers
Gaming:getPlayerId get the id of current player
Gaming:getPlayerInfo
Gaming:getPlayerName get the name of current player
Gaming:getPlayerPicture get the profile picture of current player
Gaming:getPlayerScore get the score of current player
Gaming:incrementAchievement increment the progress toward an achievement
Gaming:invitePlayers
Gaming:isLoggedIn return the login state in Gaming service
Gaming:joinRoom
Gaming:loadAchievements load all achievements
Gaming:loadPlayerCenteredScores load a leaderboard centered on the player
Gaming:loadScores load a leaderboard
Gaming:loadState load a save/state
Gaming:login log in the Gaming service
Gaming:logout log out of the gaming service
Gaming:reportAchievement report an achievement progress
Gaming:reportScore report a new score
Gaming:resolveState resolve a save/state conflict
Gaming:revealAchievement reveal an achievement
Gaming:sendTo
Gaming:sendToAll
Gaming:showAchievements show the achievements
Gaming:showInvitations
Gaming:showLeaderboard show a leaderboard
Gaming:showWaitingRoom display the waiting room
Gaming:updateState update a save/state

Events

Event.CONNECTED_TO_ROOM
Event.DATA_RECEIVED
Event.DISCONNECTED_FROM_ROOM
Event.GAME_STARTED
Event.INVITATION_RECEIVED
Event.JOINED_ROOM
Event.LEFT_ROOM
Event.LOAD_ACHIEVEMENTS_COMPLETE
Event.LOAD_ACHIEVEMENTS_ERROR
Event.LOAD_SCORES_COMPLETE
Event.LOAD_SCORES_ERROR
Event.LOGIN_COMPLETE
Event.LOGIN_ERROR
Event.PEER_CONNECTED
Event.PEER_DECLINED
Event.PEER_DISCONNECTED
Event.PEER_INVITED
Event.PEER_JOINED
Event.PEER_LEFT
Event.PLAYER_INFORMATION_COMPLETE
Event.PLAYER_INFORMATION_ERROR
Event.PLAYER_SCORE_COMPLETE
Event.PLAYER_SCORE_ERROR
Event.REPORT_ACHIEVEMENT_COMPLETE
Event.REPORT_ACHIEVEMENT_ERROR
Event.REPORT_SCORE_COMPLETE
Event.REPORT_SCORE_ERROR
Event.ROOM_AUTO_MATCHING
Event.ROOM_CONNECTED
Event.ROOM_CONNECTING
Event.ROOM_CREATED
Event.STATE_CONFLICT
Event.STATE_DELETED
Event.STATE_ERROR
Event.STATE_LOADED

Constants

Gaming.ALL_PLAYERS
Gaming.ALL_TIME
Gaming.FRIENDS
Gaming.HIDDEN
Gaming.REVEALED
Gaming.TODAY
Gaming.UNLOCKED
Gaming.WEEK