Use Custom Game State
hello i am doing a game state for my project( example: start menu , level select , level1,level2 etc) and i have been using a simple string and in the function checking to see if the string is equal to startmenu or levelselect etc.i have looked online for a more proper way of doing this and i cam across enums. some sources say use namespace with enum Type and some say use enum class. which method is better for simply checking and setting a state. and how would i check/set the enum to a particular value. I have tried the enum class method however cannot change between them.
asked Dec 25 '15 at 07:34 PM in C++ Programming
They're both valid methods and just as easy. The enum class is the more up to date method.
Alternately, instead of using a string in a function, you can check GetWorld()->GetName() - that will return the name of the map.
answered Dec 25 '15 at 07:48 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here