public void paint(Graphics g){
bufferGraphics.drawImage(background,0,0,10000,600,this);
bufferGraphics.drawImage(sidebar,720,0,200,600,this);
bufferGraphics.drawImage(chara,px,py,128,128,this);
bufferGraphics.drawImage(sworda,px,py,128,128,this);
bufferGraphics.drawImage(hi,6,507,96,96,this);
bufferGraphics.drawImage(li,200,507,96,96,this);
bufferGraphics.drawImage(mi,394,507,96,96,this);
if(at==true){
if(dir.equals("right"))
bufferGraphics.drawImage(slice,px+100,py+20,128,128,this);
else
bufferGraphics.drawImage(slice,px-100,py+20,128,128,this);
at=false;
}
g.drawImage(offscreen,0,0,this);
} |