Difference between revisions of "Gaming"

From GiderosMobile
Line 14: Line 14:
 
</ul></translate>
 
</ul></translate>
 
{|-
 
{|-
| style="width: 50%;"|
+
| style="width: 50%; vertical-align:top;"|
 
=== Methods ===
 
=== Methods ===
[[Gaming.new]] {{<translate></translate>}}<br/>
+
[[Gaming.new]] ''<translate></translate>''<br/>
[[Gaming:autoMatch]] {{<translate></translate>}}<br/>
+
[[Gaming:autoMatch]] ''<translate></translate>''<br/>
[[Gaming:deleteState]] {{<translate></translate>}}<br/>
+
[[Gaming:deleteState]] ''<translate></translate>''<br/>
[[Gaming:getAllPlayers]] {{<translate></translate>}}<br/>
+
[[Gaming:getAllPlayers]] ''<translate></translate>''<br/>
[[Gaming:getPlayerId]] {{<translate></translate>}}<br/>
+
[[Gaming:getPlayerId]] ''<translate></translate>''<br/>
[[Gaming:getPlayerInfo]] {{<translate></translate>}}<br/>
+
[[Gaming:getPlayerInfo]] ''<translate></translate>''<br/>
[[Gaming:getPlayerName]] {{<translate></translate>}}<br/>
+
[[Gaming:getPlayerName]] ''<translate></translate>''<br/>
[[Gaming:getPlayerPicture]] {{<translate></translate>}}<br/>
+
[[Gaming:getPlayerPicture]] ''<translate></translate>''<br/>
[[Gaming:getPlayerScore]] {{<translate></translate>}}<br/>
+
[[Gaming:getPlayerScore]] ''<translate></translate>''<br/>
[[Gaming:incrementAchievement]] {{<translate></translate>}}<br/>
+
[[Gaming:incrementAchievement]] ''<translate></translate>''<br/>
[[Gaming:invitePlayers]] {{<translate></translate>}}<br/>
+
[[Gaming:invitePlayers]] ''<translate></translate>''<br/>
[[Gaming:isLoggedIn]] {{<translate></translate>}}<br/>
+
[[Gaming:isLoggedIn]] ''<translate></translate>''<br/>
[[Gaming:joinRoom]] {{<translate></translate>}}<br/>
+
[[Gaming:joinRoom]] ''<translate></translate>''<br/>
[[Gaming:loadAchievements]] {{<translate></translate>}}<br/>
+
[[Gaming:loadAchievements]] ''<translate></translate>''<br/>
[[Gaming:loadPlayerCenteredScores]] {{<translate></translate>}}<br/>
+
[[Gaming:loadPlayerCenteredScores]] ''<translate></translate>''<br/>
[[Gaming:loadScores]] {{<translate></translate>}}<br/>
+
[[Gaming:loadScores]] ''<translate></translate>''<br/>
[[Gaming:loadState]] {{<translate></translate>}}<br/>
+
[[Gaming:loadState]] ''<translate></translate>''<br/>
[[Gaming:login]] {{<translate></translate>}}<br/>
+
[[Gaming:login]] ''<translate></translate>''<br/>
[[Gaming:logout]] {{<translate></translate>}}<br/>
+
[[Gaming:logout]] ''<translate></translate>''<br/>
[[Gaming:reportAchievement]] {{<translate></translate>}}<br/>
+
[[Gaming:reportAchievement]] ''<translate></translate>''<br/>
[[Gaming:reportScore]] {{<translate></translate>}}<br/>
+
[[Gaming:reportScore]] ''<translate></translate>''<br/>
[[Gaming:resolveState]] {{<translate></translate>}}<br/>
+
[[Gaming:resolveState]] ''<translate></translate>''<br/>
[[Gaming:revealAchievement]] {{<translate></translate>}}<br/>
+
[[Gaming:revealAchievement]] ''<translate></translate>''<br/>
[[Gaming:sendTo]] {{<translate></translate>}}<br/>
+
[[Gaming:sendTo]] ''<translate></translate>''<br/>
[[Gaming:sendToAll]] {{<translate></translate>}}<br/>
+
[[Gaming:sendToAll]] ''<translate></translate>''<br/>
[[Gaming:showAchievements]] {{<translate></translate>}}<br/>
+
[[Gaming:showAchievements]] ''<translate></translate>''<br/>
[[Gaming:showInvitations]] {{<translate></translate>}}<br/>
+
[[Gaming:showInvitations]] ''<translate></translate>''<br/>
[[Gaming:showLeaderboard]] {{<translate></translate>}}<br/>
+
[[Gaming:showLeaderboard]] ''<translate></translate>''<br/>
[[Gaming:showWaitingRoom]] {{<translate></translate>}}<br/>
+
[[Gaming:showWaitingRoom]] ''<translate></translate>''<br/>
[[Gaming:updateState]] {{<translate></translate>}}<br/>
+
[[Gaming:updateState]] ''<translate></translate>''<br/>
| style="width: 50%;"|
+
| style="width: 50%; vertical-align:top;"|
 
=== Events ===
 
=== Events ===
 
[[Event.CONNECTED_TO_ROOM]]<br/>
 
[[Event.CONNECTED_TO_ROOM]]<br/>

Revision as of 14:31, 23 August 2018

Supported platforms: android, ios
Available since: Gideros 2012.09

Description


The Gaming class is defined in the module "gaming". Therefore, you need to call
require("gaming") before using it. Loading the Gaming module
also creates a global class Gaming.

Currently supports:

  • Gaming.new("googleplay") -- Android
  • Gaming.new("gamekit") -- iOS

Methods

Gaming.new '
Gaming:autoMatch '
Gaming:deleteState '
Gaming:getAllPlayers '
Gaming:getPlayerId '
Gaming:getPlayerInfo '
Gaming:getPlayerName '
Gaming:getPlayerPicture '
Gaming:getPlayerScore '
Gaming:incrementAchievement '
Gaming:invitePlayers '
Gaming:isLoggedIn '
Gaming:joinRoom '
Gaming:loadAchievements '
Gaming:loadPlayerCenteredScores '
Gaming:loadScores '
Gaming:loadState '
Gaming:login '
Gaming:logout '
Gaming:reportAchievement '
Gaming:reportScore '
Gaming:resolveState '
Gaming:revealAchievement '
Gaming:sendTo '
Gaming:sendToAll '
Gaming:showAchievements '
Gaming:showInvitations '
Gaming:showLeaderboard '
Gaming:showWaitingRoom '
Gaming:updateState '

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