你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
15068753667
赞同来自:
kimiMaro
孖孖
cuixueying
要回复问题请先登录
4 个回复
15068753667
赞同来自:
const a = new Laya.Event()
Laya.__classmap['laya.events.Event'] == a.constructor //true
kimiMaro
赞同来自:
static getQualifiedClassName(value):string {
var type = typeof value;
if (!value || (type != "object" && !value.prototype)) {
return type;
}
var prototype = value.prototype ? value.prototype : Object.getPrototypeOf(value);
if (prototype.hasOwnProperty("__class__")) {
return prototype["__class__"];
}
var constructorString = prototype.constructor.toString().trim();
var index = constructorString.indexOf("(");
var className = constructorString.substring(9, index);
Object.defineProperty(prototype, "__class__", {
value: className,
enumerable: false,
writable: true
});
return className;
}
不用些谢 白鹭拷贝过来的代码
孖孖
赞同来自:
cuixueying
赞同来自: