cocos2d-html5 icon indicating copy to clipboard operation
cocos2d-html5 copied to clipboard

3.13.1 PhysicsSprite can not add child bug

Open looliver opened this issue 9 years ago • 0 comments

, ctor: function (node, space) {
    this._super();
    this.addChild(node);
    this.space = space;
    var radius = 40;
    this.body = new cp.Body(1, cp.momentForCircle(1, 0, radius, cp.v(0, 0)));
    // this.space.addBody(this.body);
    this.shape = new cp.CircleShape(this.body, radius, cp.v(0, 0));
    this.shape.setElasticity(0.5);
    this.shape.setFriction(0.5);
    this.shape.setCollisionType(ODDS_COLLISION_TYPE);
    this.space.addShape(this.shape);
    this.setBody(this.body);
    this.body.data = this;
    this.scheduleUpdate();
}

this cannot add child in this PhysicsSprite

looliver avatar Oct 09 '16 02:10 looliver