--------------------A脚本
gameOver: function () {
var Global = require(“Player”);
Global.randColor
},
----------------------B脚本
var cfg={
backLabel: 10,
randColor:function(){
cc.systemEvent.off(cc.SystemEvent.EventType.KEY_DOWN, this.onKeyDownaaa, this);
cc.systemEvent.off(cc.SystemEvent.EventType.KEY_UP, this.onKeyUp, this);
}
}
module.exports = cfg
onLoad () {
// 初始化键盘输入监听
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, this.onKeyDownaaa, this);
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_UP, this.onKeyUp, this);
},