public void AddBody(CCPhysicsBodyInfo bodyInf) { cpBody body = bodyInf.GetBody(); if (!_space.ContainsBody(body)) { _space.AddBody(body); } }
private void AddShapes() { lock (ShapesListLock) { foreach (var shape in _shapesToAdd) { _space.AddShape(shape); if (!_space.ContainsBody(shape.body)) { _space.AddBody(shape.body); } } _shapesToAdd.Clear(); } }