Cocos Creator + Box2d prefab
2017-01-05 本文已影响0人
WardenAllen
// Global.js 定义全局变量
window.Global = {
worldNode: null,
};
// World.js
Global.worldNode =this;
// Player.js
var bodyA = Global.worldNode.world.CreateBody(bodyDef);
// Global.js 定义全局变量
window.Global = {
worldNode: null,
};
// World.js
Global.worldNode =this;
// Player.js
var bodyA = Global.worldNode.world.CreateBody(bodyDef);