/** Draws the tank, bullets, planes, and background to the provided Canvas. */ private void doDraw(Canvas canvas) { // draw some background canvas.drawBitmap(mBackgroundImage, 0, 0, null); /* Paint mPaint = new Paint(); mPaint.setColor(0xFF94B0FF); canvas.drawRect(0, 0, canvas.getWidth(), canvas.getHeight(), mPaint); */ // draw the aircrafts for (Iterator it = aircrafts.iterator(); it.hasNext(); ) { FunctionalAircraft a = (FunctionalAircraft) it.next(); if (a != null) a.draw(canvas); } // draw the bullets for (Iterator it = bullets.iterator(); it.hasNext(); ) { FunctionalBullet b = (FunctionalBullet) it.next(); if (b != null) b.draw(canvas); } // Draw the tank tank.draw(canvas); // Hud draw hud.draw(canvas); }