What is the equivalent tu Unrealscript STATES?
I come from UDK, and as fas as I've read, Unrealscript STATES are something that we will not find in C++. What is the equivalent to such STATES in c++?
asked Mar 22 '14 at 09:54 PM in C++ Programming
States aren't something natively supported in C++ in the same way that Unrealscript supported them. I'd tend to say the closest equivalent is the state machine design pattern, wherein you encapsulate the state-specific logic into a series of classes inheriting from a common parent, and have your object store a reference to the base class that you can then instantiate specific states into, to utilise virtual functions.
From a quick glance, http://gameprogrammingpatterns.com/state.html seems to have a reasonable explanation of the concept.
answered Mar 22 '14 at 10:05 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here