public static Boolean CheckForCollisions(SpriteSpecifier activeSpriteSpecifier, SpriteSpecifier[] passiveSpriteSpecifiers)
 {
     foreach (SpriteSpecifier passiveSpriteSpecifier in passiveSpriteSpecifiers) {
         if (passiveSpriteSpecifier.DestinationRectangle.Intersects(activeSpriteSpecifier.DestinationRectangle)) {
             if (TexturesCollide(activeSpriteSpecifier.Colors, activeSpriteSpecifier.Matrix, passiveSpriteSpecifier.Colors, passiveSpriteSpecifier.Matrix)) {
                 return true;
             }
         }
     }
     return false;
 }
Example #2
0
 public static Boolean CheckForCollisions(SpriteSpecifier activeSpriteSpecifier, SpriteSpecifier[] passiveSpriteSpecifiers)
 {
     foreach (SpriteSpecifier passiveSpriteSpecifier in passiveSpriteSpecifiers)
     {
         if (passiveSpriteSpecifier.DestinationRectangle.Intersects(activeSpriteSpecifier.DestinationRectangle))
         {
             if (TexturesCollide(activeSpriteSpecifier.Colors, activeSpriteSpecifier.Matrix, passiveSpriteSpecifier.Colors, passiveSpriteSpecifier.Matrix))
             {
                 return(true);
             }
         }
     }
     return(false);
 }