cocos2d-x 3.0新的Physics integration,把chipmunk和Box2D封装到引擎内部

auto scene = Scene::createWithPhysics();
scene->getPhysicsWorld()->setDebugDrawMask(PhysicsWorld::DEBUGDRAW_ALL);

auto layer = HelloWorld::create();
layer->setPhyWorld(scene->getPhysicsWorld());

 

Cocos2d-JS v3.0

var scene = cc.Scene.createWithPhysics();
    //scene.getPhysicsWorld().setDebugMode(true);
    var layer1 = new GameBackgroundLayer();
    var layer2 = new MainLayer();
    scene.addChild(layer1);
    scene.addChild(layer2);

报错has no method 'createWithPhysics

相关文章:

  • 2022-12-23
  • 2022-01-10
  • 2022-12-23
  • 2022-02-17
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2022-01-05
  • 2022-12-23
相关资源
相似解决方案