This site requires JavaScript, please enable it in your browser!
Greenfoot back
dhruvsheth7
dhruvsheth7 wrote ...

2013/11/18

Need help with maintaining the state of the car

dhruvsheth7 dhruvsheth7

2013/11/18

#
Hi, I was wondering if whether the state of the car can be maintained when the games moves to next level. I am using switch case to perform actions according to the state of the car, but in the new level world, the state of the car is being reset.
Jonas234 Jonas234

2013/11/19

#
yes it is possible. you just need to abstain from creating a new object of your Car class
Danpost has a scenario for something like this: Level Changing Demo. That should help. :)
You need to login to post a reply.