使用createTiger创建闪屏

实机兼容性

  • 以下为通过实机测试的引擎以及版本,通常情况下,支持同一大版本下同一引擎的渲染(假设支持版本为1.0.0引擎,1.7.0,1.8.0,1.9.0版本的引擎可能都支持)。
引擎 版本号
laya v1.7.1
laya v2.0.0beta5.1
cocos v1.9.3
cocos v2.0.5

使用实例

let TIGER_UI = XH_MINIPRO_SDK.createTiger({
    tiger_position_id: 1260,
    app_version:1.0.1,	
});

onError

TIGER_UI.onError(error => {
    console.error(error);
})

offError

let callBack = (error) => { // 假设onError的时候绑定的为该函数
    console.log(error)
};
TIGER_UI.offError(callBack);  // 取消某个监听事件

onDestroy

  • 1、可多个监听
  • 2、返回message,销毁成功信息
TIGER_UI.onDestroy(({message}) => {
    console.log(message)
});

offDestroy

  • 1、不传入回调函数时,取消所有回调
TIGER_UI.offDestroy();  // 取消所有监听事件
  • 2、传入与监听相同的回调函数只取消该回调
let destroyCallBack = ({from, message}) => { // 假设onDestroy的时候绑定的为该函数
    console.log(from, message)
};
TIGER_UI.offDestroy(destroyCallBack);  // 取消某个监听事件