public ColliderShape CreateShape()
        {
            if (Shape == null)
            {
                return(null);
            }

            if (Shape.Shape == null)
            {
                Shape.Shape = PhysicsColliderShape.Compose(Shape.Descriptions);
            }

            return(this.Shape.Shape);
        }
        public ColliderShape CreateShape(Simulation simulation, ContentManager content)
        {
            if (Shape == null)
            {
                return(null);
            }

            if (Shape.Shape == null)
            {
                Shape.Shape = PhysicsColliderShape.Compose(simulation, content, Shape.Descriptions);
            }

            return(Shape.Shape);
        }
示例#3
0
        public ColliderShape CreateShape(IServiceRegistry services)
        {
            if (Shape == null)
            {
                return(null);
            }

            if (Shape.Shape == null)
            {
                Shape.Shape = PhysicsColliderShape.Compose(Shape.Descriptions, services);
                if (Shape.Shape != null)
                {
                    Shape.Shape.Description = this;
                }
            }

            return(this.Shape.Shape);
        }