A
anthropus
Guest
Is there a built in limit, or a practical limit (causes slow down), to the number of cases that can be in a switch statement? does it matter where the switch statement is (like in a step event vs a draw event)?
the player in my game has a complex set animations/states and gear you can see, and i use a switch statement to control which gear/weapons are drawn, and its organized and works very nice, but how far can i push the switch statement in terms of number of cases? is 50 too many for example?
if having a high number of cases is something that is limited, would having each piece of gear you can see be its own object and ill just create instances of those, be a good idea or better alternative? what is another way i can control a such a complex set animations/states and gear you can see?
thanks!
the player in my game has a complex set animations/states and gear you can see, and i use a switch statement to control which gear/weapons are drawn, and its organized and works very nice, but how far can i push the switch statement in terms of number of cases? is 50 too many for example?
if having a high number of cases is something that is limited, would having each piece of gear you can see be its own object and ill just create instances of those, be a good idea or better alternative? what is another way i can control a such a complex set animations/states and gear you can see?
thanks!