Difference between revisions of "Gaming"

From GiderosMobile
Line 4: Line 4:
 
=== Description ===
 
=== Description ===
 
<translate><br />
 
<translate><br />
The [[Gaming]] class is defined in the module &quot;gaming&quot;. Therefore, you need to call<br />
+
The [[Special:MyLanguage/Gaming|Gaming]] class is defined in the module &quot;gaming&quot;. Therefore, you need to call<br />
[[require(&quot;gaming&quot;)]] before using it. Loading the Gaming module <br />
+
[[Special:MyLanguage/require(&quot;gaming&quot;)|require(&quot;gaming&quot;)]] before using it. Loading the Gaming module <br />
also creates a global class [[Gaming]]. <br />
+
also creates a global class [[Special:MyLanguage/Gaming|Gaming]]. <br />
  
 
<p><strong>Currently supports:</strong></p>
 
<p><strong>Currently supports:</strong></p>
Line 16: Line 16:
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Methods ===
 
=== Methods ===
[[Gaming.new]] <br/>
+
[[Special:MyLanguage/Gaming.new|Gaming.new]] <br/>
[[Gaming:autoMatch]] <br/>
+
[[Special:MyLanguage/Gaming:autoMatch|Gaming:autoMatch]] <br/>
[[Gaming:deleteState]] <br/>
+
[[Special:MyLanguage/Gaming:deleteState|Gaming:deleteState]] <br/>
[[Gaming:getAllPlayers]] <br/>
+
[[Special:MyLanguage/Gaming:getAllPlayers|Gaming:getAllPlayers]] <br/>
[[Gaming:getPlayerId]] <br/>
+
[[Special:MyLanguage/Gaming:getPlayerId|Gaming:getPlayerId]] <br/>
[[Gaming:getPlayerInfo]] <br/>
+
[[Special:MyLanguage/Gaming:getPlayerInfo|Gaming:getPlayerInfo]] <br/>
[[Gaming:getPlayerName]] <br/>
+
[[Special:MyLanguage/Gaming:getPlayerName|Gaming:getPlayerName]] <br/>
[[Gaming:getPlayerPicture]] <br/>
+
[[Special:MyLanguage/Gaming:getPlayerPicture|Gaming:getPlayerPicture]] <br/>
[[Gaming:getPlayerScore]] <br/>
+
[[Special:MyLanguage/Gaming:getPlayerScore|Gaming:getPlayerScore]] <br/>
[[Gaming:incrementAchievement]] <br/>
+
[[Special:MyLanguage/Gaming:incrementAchievement|Gaming:incrementAchievement]] <br/>
[[Gaming:invitePlayers]] <br/>
+
[[Special:MyLanguage/Gaming:invitePlayers|Gaming:invitePlayers]] <br/>
[[Gaming:isLoggedIn]] <br/>
+
[[Special:MyLanguage/Gaming:isLoggedIn|Gaming:isLoggedIn]] <br/>
[[Gaming:joinRoom]] <br/>
+
[[Special:MyLanguage/Gaming:joinRoom|Gaming:joinRoom]] <br/>
[[Gaming:loadAchievements]] <br/>
+
[[Special:MyLanguage/Gaming:loadAchievements|Gaming:loadAchievements]] <br/>
[[Gaming:loadPlayerCenteredScores]] <br/>
+
[[Special:MyLanguage/Gaming:loadPlayerCenteredScores|Gaming:loadPlayerCenteredScores]] <br/>
[[Gaming:loadScores]] <br/>
+
[[Special:MyLanguage/Gaming:loadScores|Gaming:loadScores]] <br/>
[[Gaming:loadState]] <br/>
+
[[Special:MyLanguage/Gaming:loadState|Gaming:loadState]] <br/>
[[Gaming:login]] <br/>
+
[[Special:MyLanguage/Gaming:login|Gaming:login]] <br/>
[[Gaming:logout]] <br/>
+
[[Special:MyLanguage/Gaming:logout|Gaming:logout]] <br/>
[[Gaming:reportAchievement]] <br/>
+
[[Special:MyLanguage/Gaming:reportAchievement|Gaming:reportAchievement]] <br/>
[[Gaming:reportScore]] <br/>
+
[[Special:MyLanguage/Gaming:reportScore|Gaming:reportScore]] <br/>
[[Gaming:resolveState]] <br/>
+
[[Special:MyLanguage/Gaming:resolveState|Gaming:resolveState]] <br/>
[[Gaming:revealAchievement]] <br/>
+
[[Special:MyLanguage/Gaming:revealAchievement|Gaming:revealAchievement]] <br/>
[[Gaming:sendTo]] <br/>
+
[[Special:MyLanguage/Gaming:sendTo|Gaming:sendTo]] <br/>
[[Gaming:sendToAll]] <br/>
+
[[Special:MyLanguage/Gaming:sendToAll|Gaming:sendToAll]] <br/>
[[Gaming:showAchievements]] <br/>
+
[[Special:MyLanguage/Gaming:showAchievements|Gaming:showAchievements]] <br/>
[[Gaming:showInvitations]] <br/>
+
[[Special:MyLanguage/Gaming:showInvitations|Gaming:showInvitations]] <br/>
[[Gaming:showLeaderboard]] <br/>
+
[[Special:MyLanguage/Gaming:showLeaderboard|Gaming:showLeaderboard]] <br/>
[[Gaming:showWaitingRoom]] <br/>
+
[[Special:MyLanguage/Gaming:showWaitingRoom|Gaming:showWaitingRoom]] <br/>
[[Gaming:updateState]] <br/>
+
[[Special:MyLanguage/Gaming:updateState|Gaming:updateState]] <br/>
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Events ===
 
=== Events ===
[[Event.CONNECTED_TO_ROOM]]<br/>
+
[[Special:MyLanguage/Event.CONNECTED_TO_ROOM|Event.CONNECTED_TO_ROOM]]<br/>
[[Event.DATA_RECEIVED]]<br/>
+
[[Special:MyLanguage/Event.DATA_RECEIVED|Event.DATA_RECEIVED]]<br/>
[[Event.DISCONNECTED_FROM_ROOM]]<br/>
+
[[Special:MyLanguage/Event.DISCONNECTED_FROM_ROOM|Event.DISCONNECTED_FROM_ROOM]]<br/>
[[Event.GAME_STARTED]]<br/>
+
[[Special:MyLanguage/Event.GAME_STARTED|Event.GAME_STARTED]]<br/>
[[Event.INVITATION_RECEIVED]]<br/>
+
[[Special:MyLanguage/Event.INVITATION_RECEIVED|Event.INVITATION_RECEIVED]]<br/>
[[Event.JOINED_ROOM]]<br/>
+
[[Special:MyLanguage/Event.JOINED_ROOM|Event.JOINED_ROOM]]<br/>
[[Event.LEFT_ROOM]]<br/>
+
[[Special:MyLanguage/Event.LEFT_ROOM|Event.LEFT_ROOM]]<br/>
[[Event.LOAD_ACHIEVEMENTS_COMPLETE]]<br/>
+
[[Special:MyLanguage/Event.LOAD_ACHIEVEMENTS_COMPLETE|Event.LOAD_ACHIEVEMENTS_COMPLETE]]<br/>
[[Event.LOAD_ACHIEVEMENTS_ERROR]]<br/>
+
[[Special:MyLanguage/Event.LOAD_ACHIEVEMENTS_ERROR|Event.LOAD_ACHIEVEMENTS_ERROR]]<br/>
[[Event.LOAD_SCORES_COMPLETE]]<br/>
+
[[Special:MyLanguage/Event.LOAD_SCORES_COMPLETE|Event.LOAD_SCORES_COMPLETE]]<br/>
[[Event.LOAD_SCORES_ERROR]]<br/>
+
[[Special:MyLanguage/Event.LOAD_SCORES_ERROR|Event.LOAD_SCORES_ERROR]]<br/>
[[Event.LOGIN_COMPLETE]]<br/>
+
[[Special:MyLanguage/Event.LOGIN_COMPLETE|Event.LOGIN_COMPLETE]]<br/>
[[Event.LOGIN_ERROR]]<br/>
+
[[Special:MyLanguage/Event.LOGIN_ERROR|Event.LOGIN_ERROR]]<br/>
[[Event.PEER_CONNECTED]]<br/>
+
[[Special:MyLanguage/Event.PEER_CONNECTED|Event.PEER_CONNECTED]]<br/>
[[Event.PEER_DECLINED]]<br/>
+
[[Special:MyLanguage/Event.PEER_DECLINED|Event.PEER_DECLINED]]<br/>
[[Event.PEER_DISCONNECTED]]<br/>
+
[[Special:MyLanguage/Event.PEER_DISCONNECTED|Event.PEER_DISCONNECTED]]<br/>
[[Event.PEER_INVITED]]<br/>
+
[[Special:MyLanguage/Event.PEER_INVITED|Event.PEER_INVITED]]<br/>
[[Event.PEER_JOINED]]<br/>
+
[[Special:MyLanguage/Event.PEER_JOINED|Event.PEER_JOINED]]<br/>
[[Event.PEER_LEFT]]<br/>
+
[[Special:MyLanguage/Event.PEER_LEFT|Event.PEER_LEFT]]<br/>
[[Event.PLAYER_INFORMATION_COMPLETE]]<br/>
+
[[Special:MyLanguage/Event.PLAYER_INFORMATION_COMPLETE|Event.PLAYER_INFORMATION_COMPLETE]]<br/>
[[Event.PLAYER_INFORMATION_ERROR]]<br/>
+
[[Special:MyLanguage/Event.PLAYER_INFORMATION_ERROR|Event.PLAYER_INFORMATION_ERROR]]<br/>
[[Event.PLAYER_SCORE_COMPLETE]]<br/>
+
[[Special:MyLanguage/Event.PLAYER_SCORE_COMPLETE|Event.PLAYER_SCORE_COMPLETE]]<br/>
[[Event.PLAYER_SCORE_ERROR]]<br/>
+
[[Special:MyLanguage/Event.PLAYER_SCORE_ERROR|Event.PLAYER_SCORE_ERROR]]<br/>
[[Event.REPORT_ACHIEVEMENT_COMPLETE]]<br/>
+
[[Special:MyLanguage/Event.REPORT_ACHIEVEMENT_COMPLETE|Event.REPORT_ACHIEVEMENT_COMPLETE]]<br/>
[[Event.REPORT_ACHIEVEMENT_ERROR]]<br/>
+
[[Special:MyLanguage/Event.REPORT_ACHIEVEMENT_ERROR|Event.REPORT_ACHIEVEMENT_ERROR]]<br/>
[[Event.REPORT_SCORE_COMPLETE]]<br/>
+
[[Special:MyLanguage/Event.REPORT_SCORE_COMPLETE|Event.REPORT_SCORE_COMPLETE]]<br/>
[[Event.REPORT_SCORE_ERROR]]<br/>
+
[[Special:MyLanguage/Event.REPORT_SCORE_ERROR|Event.REPORT_SCORE_ERROR]]<br/>
[[Event.ROOM_AUTO_MATCHING]]<br/>
+
[[Special:MyLanguage/Event.ROOM_AUTO_MATCHING|Event.ROOM_AUTO_MATCHING]]<br/>
[[Event.ROOM_CONNECTED]]<br/>
+
[[Special:MyLanguage/Event.ROOM_CONNECTED|Event.ROOM_CONNECTED]]<br/>
[[Event.ROOM_CONNECTING]]<br/>
+
[[Special:MyLanguage/Event.ROOM_CONNECTING|Event.ROOM_CONNECTING]]<br/>
[[Event.ROOM_CREATED]]<br/>
+
[[Special:MyLanguage/Event.ROOM_CREATED|Event.ROOM_CREATED]]<br/>
[[Event.STATE_CONFLICT]]<br/>
+
[[Special:MyLanguage/Event.STATE_CONFLICT|Event.STATE_CONFLICT]]<br/>
[[Event.STATE_DELETED]]<br/>
+
[[Special:MyLanguage/Event.STATE_DELETED|Event.STATE_DELETED]]<br/>
[[Event.STATE_ERROR]]<br/>
+
[[Special:MyLanguage/Event.STATE_ERROR|Event.STATE_ERROR]]<br/>
[[Event.STATE_LOADED]]<br/>
+
[[Special:MyLanguage/Event.STATE_LOADED|Event.STATE_LOADED]]<br/>
 
=== Constants ===
 
=== Constants ===
[[Gaming.ALL_PLAYERS]]<br/>
+
[[Special:MyLanguage/Gaming.ALL_PLAYERS|Gaming.ALL_PLAYERS]]<br/>
[[Gaming.ALL_TIME]]<br/>
+
[[Special:MyLanguage/Gaming.ALL_TIME|Gaming.ALL_TIME]]<br/>
[[Gaming.FRIENDS]]<br/>
+
[[Special:MyLanguage/Gaming.FRIENDS|Gaming.FRIENDS]]<br/>
[[Gaming.HIDDEN]]<br/>
+
[[Special:MyLanguage/Gaming.HIDDEN|Gaming.HIDDEN]]<br/>
[[Gaming.REVEALED]]<br/>
+
[[Special:MyLanguage/Gaming.REVEALED|Gaming.REVEALED]]<br/>
[[Gaming.TODAY]]<br/>
+
[[Special:MyLanguage/Gaming.TODAY|Gaming.TODAY]]<br/>
[[Gaming.UNLOCKED]]<br/>
+
[[Special:MyLanguage/Gaming.UNLOCKED|Gaming.UNLOCKED]]<br/>
[[Gaming.WEEK]]<br/>
+
[[Special:MyLanguage/Gaming.WEEK|Gaming.WEEK]]<br/>
 
|}
 
|}

Revision as of 16:35, 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