屏幕怎么不刷新了,flushGraphics()方法没有被抑制啊?把你源码发过来吧 老大private void draw()
{
if(a){
if (score <= 4000){
g.drawImage(imgBack1, 0, backY, 0);
if(backY>0&&backY<CanvasHeight)
g.drawImage(imgBack1, 0, backY-imgBack2.getHeight(), 0);
}
//背景1
if (score > 4000 && score <= 7000)
{
g.drawImage(imgBack2, 0, backY, 0); //背景2
if(backY>0&&backY<CanvasHeight)
g.drawImage(imgBack2, 0, backY-imgBack2.getHeight(), 0);
}
if (score > 7000 && score <= 10100)
{
g.drawImage(imgBack3, 0, backY, 0); //背景3
if(backY>0&&backY<CanvasHeight)
g.drawImage(imgBack3, 0, backY-imgBack2.getHeight(), 0);
}
for (i = 0; i < 3; i++)
{
bullets[i].draw(g);
}
enemy1.draw(g);
enemy2.draw(g);
bonus.draw(g);
for (i = 0; i < 8; i++)
{
enemy3456[i].draw(g);
}
}
if(!a)
{
bullets1.draw(g);
}
player.paint(g);
g.drawImage(imgState, 0, CanvasHeight - 10, g.TOP g.LEFT);
g.setColor(0xffff00);
g.fillRect(8, CanvasHeight - 10+3, energy, 4);
if (isExplored)
{
g.drawImage(imgExplored, expX, expY, g.TOP