public virtual CCPhysicsBody AddBody(CCPhysicsBody body) { cp.AssertWarn(body != null, "the body can not be nullptr"); if (body.GetWorld() == this) { return(null); } if (body.GetWorld() != null) { body.RemoveFromWorld(); } AddBodyOrDelay(body); _bodies.Add(body); body._world = this; return(body); }
public virtual CCPhysicsBody AddBody(CCPhysicsBody body) { cp.AssertWarn(body != null, "the body can not be nullptr"); if (body.GetWorld() == this) return null; if (body.GetWorld() != null) { body.RemoveFromWorld(); } AddBodyOrDelay(body); _bodies.Add(body); body._world = this; return body; }