示例#1
0
 public void OverridePhysicsShape(IList <Vector2[]> physicsShapes)
 {
     for (int i = 0; i < physicsShapes.Count; i++)
     {
         Vector2[] array = physicsShapes[i];
         if (array == null)
         {
             throw new ArgumentNullException(string.Format("Physics Shape at {0} is null.", i));
         }
         if (array.Length < 3)
         {
             throw new ArgumentException(string.Format("Physics Shape at {0} has less than 3 vertices ({1}).", i, array.Length));
         }
     }
     Sprite.OverridePhysicsShapeCount(this, physicsShapes.Count);
     for (int j = 0; j < physicsShapes.Count; j++)
     {
         Sprite.OverridePhysicsShape(this, physicsShapes[j], j);
     }
 }