标签:ring script his call defaults property str label tco
var descriptor, label, set; descriptor = Object.getOwnPropertyDescriptor(cc.Label.prototype, "string"); descriptor = lo.defaults({}, descriptor); set = descriptor.set; descriptor.set = function(string) { return set.call(this, "123"); }; label = this.node.getComponent(cc.Label); Object.defineProperty(label, "string", descriptor); label.string = label.string
标签:ring script his call defaults property str label tco
原文地址:https://www.cnblogs.com/xyptechnology/p/10329893.html