Sign in to follow this  
Munchie Games

reusing states multiple times, init once

Recommended Posts

HI,

 

When moving back and fourth between say a menu state and a gameplay state, is there a way to not rebuild an entire game or menu each time? init and create seem to get hit every time a state is started. I didn't see much in interphase about proper multiple use of a state, and in the game examples it seems states are always rebuilt each time you move between them. Is that technique better for GC than initilizing game elements just once and reusing?

 

Thanks

 

Ian S

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.