You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
642 B
20 lines
642 B
import DefaultDevice from "./DefaultDevice";
|
|
/**
|
|
* 微信设备
|
|
*/
|
|
export default class WXDevice extends DefaultDevice {
|
|
Vibrate(isLong: boolean) {
|
|
console.log("调用震动", isLong);
|
|
//判断是否在小游戏平台
|
|
if (window['wx']) {
|
|
|
|
if (isLong) {
|
|
cc.sys.call(window['wx'].vibrateLong,[null]);
|
|
//Laya.timer.callLater( window['wx'], window['wx'].vibrateLong, [null]);
|
|
} else {
|
|
cc.sys.call(window['wx'].vibrateShort,[null]);
|
|
//Laya.timer.callLater(wx, wx.vibrateShort, [null]);
|
|
}
|
|
}
|
|
}
|
|
}
|