コード例 #1
0
 void DestroyMatches()
 {
     int[,] d;
     if (redC.hasMatch)
     {
         for (int r = 0; r < redC.Matches(); r++)
         {
             d = redC.DestroyCubes(r);
             D_Cubes(d);
         }
     }
     redC.ClearCounter(); redC.ClearMatchesFound(); redC.ClearBool();
     if (greenC.hasMatch)
     {
         for (int g = 0; g < greenC.Matches(); g++)
         {
             d = greenC.DestroyCubes(g);
             D_Cubes(d);
         }
     }
     greenC.ClearCounter(); greenC.ClearMatchesFound(); greenC.ClearBool();
     if (orangeC.hasMatch)
     {
         for (int o = 0; o < orangeC.Matches(); o++)
         {
             d = orangeC.DestroyCubes(o);
             D_Cubes(d);
         }
     }
     orangeC.ClearCounter(); orangeC.ClearMatchesFound(); orangeC.ClearBool();
     if (blueC.hasMatch)
     {
         for (int b = 0; b < blueC.Matches(); b++)
         {
             d = blueC.DestroyCubes(b);
             D_Cubes(d);
         }
     }
     blueC.ClearCounter(); blueC.ClearMatchesFound(); blueC.ClearBool();
 }