这么创建,销毁物体为什么不行?
请问应该怎么销毁物体?
var body = new cp.Body(1,cp.momentForBox(1,20,20));
body.setPos(cc.p(100,300));
body = this._space.addBody(body);
var shape=cp.BoxShape(body,20,20);
shape.setElasticity(0.5);
shape.setFriction(0.8);
this._space.addShape(shape);
var shapeList = body.shapeList;
body.removeShape(shapeList);
this._space.removeBody(body);