ivanix Posted May 28, 2014 Share Posted May 28, 2014 Hello, I am trying to get a handle on how best to use states with common resources such as backgrounds, graphics, and audio. In my current understanding, since each new state has a preload section that loads its own graphics, I feel its not efficient to have to recode and reload for each new state. I also assume that each new screen, such as splash screen, credits screen, options screen, etc, should each be its own different state, and if using common graphic background and text style, is there a way to load only once for all states? Or is more likely, my understanding on how to use states is wrong?Can I use one state for several screens? Thanks to anyone who can straighten me out Link to comment Share on other sites More sharing options...
j0hnskot Posted May 28, 2014 Share Posted May 28, 2014 Edit : i thought i found a solution,i was wrong. Link to comment Share on other sites More sharing options...
haden Posted May 28, 2014 Share Posted May 28, 2014 You don't need to use the preload function of each and every state, have one of your states be the "preloader" where you load all your assets in it's preload function, then all remaining states can just use those assets. Link to comment Share on other sites More sharing options...
Recommended Posts