Difference between revisions of "FBInstant.setLoadingProgress"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Available since:''' Gideros 2018.3<br/> | + | <languages /> |
− | === Description === | + | '''<translate>Available since</translate>:''' Gideros 2018.3<br/> |
+ | '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> | ||
+ | === <translate>Description</translate> === | ||
<translate><br /> | <translate><br /> | ||
Report the game's initial loading progress.<br /></translate> | Report the game's initial loading progress.<br /></translate> | ||
− | < | + | <syntaxhighlight lang="lua"> |
FBInstant.setLoadingProgress(percentage) | FBInstant.setLoadingProgress(percentage) | ||
− | </ | + | </syntaxhighlight> |
− | === Parameters === | + | === <translate>Parameters</translate> === |
'''percentage''': (number) <translate>A number between 0 and 100.</translate> <br/> | '''percentage''': (number) <translate>A number between 0 and 100.</translate> <br/> | ||
− | === Examples === | + | === <translate>Examples</translate> === |
'''Example'''<br/> | '''Example'''<br/> | ||
− | < | + | <syntaxhighlight lang="lua"> |
FBInstant.getSupportedAPIs( function(result,error) | FBInstant.getSupportedAPIs( function(result,error) | ||
local progressCount=0 | local progressCount=0 | ||
Line 24: | Line 26: | ||
-- eventually call FBInstant.startGameAsync(function) just before starting the game proper. | -- eventually call FBInstant.startGameAsync(function) just before starting the game proper. | ||
end) | end) | ||
− | <br/></ | + | <br/></syntaxhighlight> |
+ | |||
+ | {{FBInstant}} |
Latest revision as of 14:29, 13 July 2023
Available since: Gideros 2018.3
Class: * Initialisation and Core
Description
Report the game's initial loading progress.
FBInstant.setLoadingProgress(percentage)
Parameters
percentage: (number) A number between 0 and 100.
Examples
Example
FBInstant.getSupportedAPIs( function(result,error)
local progressCount=0
function progress()
progressCount+=1
local steps=9 -- set to the number of times progress() called
local percent=70+((30/steps)*progressCount) -- on export set the % to 70
print("Progress",progressCount,percent.."%")
if FBInstant then FBInstant.setLoadingProgress(percent) end
end
progress() -- do this multiple times as you load images, process data, etc
-- eventually call FBInstant.startGameAsync(function) just before starting the game proper.
end)
<br/>
- FBInstant.canCreateShortcutAsync
- FBInstant.checkCanPlayerMatchAsync
- FBInstant.createShortcutAsync
- FBInstant.getEntryPointAsync
- FBInstant.getEntryPointData
- FBInstant.getInterstitialAdAsync
- FBInstant.getLeaderboardAsync
- FBInstant.getLocale
- FBInstant.getPlatform
- FBInstant.getRewardedVideoAsync
- FBInstant.getSDKVersion
- FBInstant.getSupportedAPIs
- FBInstant.logEvent
- FBInstant.matchPlayerAsync
- FBInstant.onPause
- FBInstant.quit
- FBInstant.setLoadingProgress
- FBInstant.setSessionData
- FBInstant.shareAsync
- FBInstant.startGameAsync
- FBInstant.switchGameAsync
- FBInstant.updateAsync