I\'m working on a small arcade video game, and I am looking to double buffer to improve animation. I have one class that\'s supposed to draw the blank image, and another class t
Since MC extends render, the dbg
you are referring to belongs to the MC instance that called draw. You can fix it by calling
render.dbg.drawLine( 100, 100, 200, 200 );
or take advantage of the inheritance you implemented
class MC extends Render {
//MC is a render, so you don't need to create another one
public void draw() {
gameRender(); //Call the MC's own gameRender
dbg.drawLine( 100, 100, 200, 200 ); //Calling gameRender initialized dbg so you won't get a NullPointerException
}
}