@406504302 写道:
脚本A
cc.Class({
extends: cc.Component,
properties: {
speed: 1
},onLoad: function () { }
});
脚本B
var a = require("A");
cc.Class({
extends: cc.Component,
properties: {
speed: 1
},onLoad: function () { cc.info(a.speed); }
});
打印内容: undefined
参考:http://www.cocos.com/docs/creator/scripting/modular-script.html
帖子: 3
参与者: 1