games/Legend-of-the-Water-Cup/assets/scripts/Handler.js

13 lines
276 B
JavaScript

var Handler = cc.Class({
properties: {
callback: null,
thisObj: null
},
ctor: function(callback, thisObj) {
this.callback = callback;
this.thisObj = thisObj;
},
execute: function(params = null) {
this.callback.apply(this.thisObj, params);
}
});