我正在尝试用自定义图片替换标准黑色背景,但我不确定如何实现它......
代码(onDraw方法):
@Override
protected void onDraw(Canvas c) {
//c.drawARGB(255, 0, 0, 0);
if ( overlay.tick() )
if ( !todraw.tick() )
mintercept.endGame();
todraw.draw(c, Layer.BACKGROUND);
todraw.draw(c, Layer.CITIES);
todraw.draw(c, Layer.TRAILS);
todraw.draw(c, Layer.EXPLOSIONS);
todraw.draw(c, Layer.MISSILES);
todraw.draw(c, Layer.CHROME);
overlay.draw(c, Layer.CHROME);
}
public abstract void reset();
}
评论线负责黑色背景(或者我认为......);空白空间保留用于实现自定义背景图像。我怎么能这样做?