• Pipeline.Downloader 类型
    • 索引
      • 方法
  • Details
    • 方法
      • constructor
        • 参数列表
      • 示例
      • addHandlers
        • 参数列表
      • loadSubpackage
        • 参数列表

    Pipeline.Downloader 类型

    模块: cc父模块: cc

    The downloader pipe, it can download several types of files:

    • Text
    • Image
    • Script
    • Audio
    • AssetsAll unknown type will be downloaded as plain text.You can pass custom supported types in the constructor.

    索引

    方法
    • constructor Constructor of Downloader, you can pass custom supported types.
    • addHandlers Add custom supported types handler or modify existing type handler.
    • loadSubpackage 通过子包名加载子包代码。

    Details

    方法

    constructor

    Constructor of Downloader, you can pass custom supported types.

    metadescription
    定义于cocos2d/core/load-pipeline/downloader.js:210
    参数列表
    • extMap Object Custom supported types with corresponded handler
    示例
    1. var downloader = new Downloader({
    2. // This will match all url with `.scene` extension or all url with `scene` type
    3. 'scene' : function (url, callback) {}
    4. });
    addHandlers

    Add custom supported types handler or modify existing type handler.

    metadescription
    定义于cocos2d/core/load-pipeline/downloader.js:235
    参数列表
    • extMap Object Custom supported types with corresponded handler
    loadSubpackage

    通过子包名加载子包代码。

    metadescription
    定义于cocos2d/core/load-pipeline/downloader.js:293
    参数列表
    • name String Subpackage name
    • completeCallback Function Callback invoked when subpackage loaded
      • error Error error information