Android Rendering Problem: Old content still exists after calling setCurrentState();

Get help on issues related to the book here!
Maxwell
Rank 1
Rank 1
Posts: 1
Joined: Sat Nov 18, 2017 7:32 pm

Android Rendering Problem: Old content still exists after calling setCurrentState();

Postby Maxwell » Wed Nov 22, 2017 12:00 am

Hello! I copy the whole GameView class from the website, and then I find a problem in rendering.
I use the same structure of the abstract class State. I let MenuState render a picture and system time, and then in 3 seconds it calls the method setCurrentState() and transforms into PlayState. I doesn't let PlayState do anything just yet, but it's still rendering the old picture but the time stops changing which proves that the render() in MenuState has stopped being called. But why does the old content still exists instead of disappearing? I did the exactly same thing in a normal Java project, but the old content just disappeared right after it changed the state. :roll:

Return to “Book General Help”

Who is online

Users browsing this forum: No registered users and 1 guest