Beispiel #1
0
 @Override
 public void drawRect(CGRect rect) {
   float black[] = {0, 0, 0, 1};
   CGContext ctx = UIGraphics.getCurrentContext();
   ctx.setFillColor(black);
   ctx.fillRect(rect);
   for (int j = 0; j < Const.BOMB_COUNT; ++j) {
     for (int i = 0; i < Const.SPARKS_PER_BOMB; ++i) {
       if (!CGRect.Intersection(rect, bombs[j].sparks[i].position).isNull()) {
         bombs[j].sparks[i].image.drawInRect(bombs[j].sparks[i].position);
       }
     }
   }
 }