What I'm curious about is how to determine the progress of the progress bar (lol). I mean, do you take, for example, all the resources you'll load, let's say 120 between images and sounds, then you'll do 120 items / 100 % = 1.2, thus when loading one resources incrementing 1,2 of the progress bar??
I just realize that would be actually a good idea, right?
1 2 3 4 5 6 7 8 9 10 11
| private void loadEverything(){ int incrementFactor = cantResources / 100; for(int i=0;i<cantImg;i++){ loadImage("image"+i+".png"); incrementProgressBar(incrementFactor); } for(int i=0;i<cantImg;i++){ loadSould("sound"+i+".wav"); incrementProgressBar(incrementFactor); } } |
Edit: Added incrementFactor
