示例#1
0
        public void AddBody(CCPhysicsBodyInfo bodyInf)
        {
            cpBody body = bodyInf.GetBody();

            if (!_space.ContainsBody(body))
            {
                _space.AddBody(body);
            }
        }
示例#2
0
        private void AddShapes()
        {
            lock (ShapesListLock)
            {
                foreach (var shape in _shapesToAdd)
                {
                    _space.AddShape(shape);
                    if (!_space.ContainsBody(shape.body))
                    {
                        _space.AddBody(shape.body);
                    }
                }

                _shapesToAdd.Clear();
            }
        }