添加游戏回到前台事件监听器。
游戏回到前台事件的回调函数。Web 平台无启动参数,回调参数为 undefined。
undefined
返回一个函数,调用该函数可以移除监听器。
2.2.0
const removeListener = addShowListener((options) => { console.log('游戏回到前台:', options?.scene);});// 移除监听器removeListener(); Copy
const removeListener = addShowListener((options) => { console.log('游戏回到前台:', options?.scene);});// 移除监听器removeListener();
添加游戏回到前台事件监听器。