コード例 #1
0
        public ColliderShape CreateShape()
        {
            if (Shape == null)
            {
                return(null);
            }

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

            return(this.Shape.Shape);
        }
コード例 #2
0
        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);
        }