Ejemplo n.º 1
0
 public void onDraw(Canvas canvas, Rect bounds) {
   BOUNDS = bounds;
   if (BackRects.size() == 0) generateRects();
   try {
     if (UPDATE) {
       UPDATE = false;
       for (BackRect r : BackRects) r.onDraw(canvas, bounds);
     }
   } catch (Exception e) {
   }
 }
Ejemplo n.º 2
0
 public void move(int move) {
   if (!MOVEME) return;
   for (BackRect r : BackRects) {
     r.moveLeft(move);
   }
   BackRect r = BackRects.get(0);
   if (r.isInvisible()) {
     int p = BackRects.get(BackRects.size() - 1).BaseRect.right;
     int w = r.BaseRect.width();
     r.BaseRect.left = p;
     r.BaseRect.right = p + w;
     r.moveLeft(move);
     BackRects.remove(0);
     BackRects.add(r);
     LAST++;
     if (LAST >= 50 && GameConst.ChangeColor) {
       LAST = 0;
       ConstColor.setRandom();
     }
   }
 }