Jump to content

reusing states multiple times, init once


Munchie Games
 Share

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...