DLC

DLC

Downloadable Content的简写,即可下载内容。

1. 获取DLC数量

greenworks.getDLCCount()

获取当前运行中应用的DLC数量。

2. 通过索引获取DLC数据

greenworks.getDLCDataByIndex(index)

  • index Integer: 该DLC的索引,其值的范围应该在 0 到 greenworks.getDLCCount 之间。

如果找不到索引匹配的DLC则返回 undefined,否则会返回一个对象,包含下面的内容:

  • appId Integer: 该DLC的APPID。

  • available Boolean: 该DLC当前是否可用的标志位。

  • name String: 该DLC的名称。

3. DLC是否安装

greenworks.isDLCInstalled(dlc_app_id)

  • dlc_app_id Integer: 该DLC的APPID。

查看用户是否拥有这个DLC以及DLC是否已安装。

4. 安装DLC

greenworks.installDLC(dlc_app_id)

  • dlc_app_id Integer: 该DLC的APPID。

安装指定的DLC。

5. 卸载DLC

greenworks.uninstallDLC(dlc_app_id)

  • dlc_app_id Integer: 该DLC的APPID。

卸载指定的DLC。