loadPackage
Load a game package using the supplied parameters and receive results and stage progress through SUDRTFSMGame.
Declaration
java
SUDRTFSTAPP loadPackage(SUDRTLoadGameParams model, SUDRTFSMGame fsmGame);SUDRTLoadGameParams
global.sud.op.runtime.core.model.SUDRTLoadGameParams
| Field | Type | Description |
|---|---|---|
context | Context | Required loading context |
userId | String | Required nonempty user ID |
gameId | String | Required nonempty game ID |
version | String | Game package version |
path | String | Path or URL matching pathType |
pathType | SUDOPGamePathType | FILE, DIR, URL, SIGNATURE, or GAME_ID |
gameSignature | String | Game signature |
SUDRTFSMGame
java
public interface SUDRTFSMGame {
void onSuccess(SUDOPGameInfo gameInfo, GameMetaInfo gameMetaInfo);
void onFailure(int retCode, String retMsg);
void onGameLoadingProgress(int stage, int retCode, int progress);
void onPkgDownloaded();
void onPkgInstalled();
}Progress stage: 1 = start, 2 = loading, 3 = end. retCode 0 indicates success; progress ranges from 0 to 100. onPkgDownloaded and onPkgInstalled report completion of downloading and installation.
SUDOPGameInfo is in global.sud.op.runtime.core.model; GameMetaInfo is in global.sud.op.runtime.hub.model.
Return value
SUDRTFSTAPP is a loading-operation handle. Its current interface exposes no methods and provides no run, stop, or cancel operation. To start a game from the app, use startGame.
