Experienced programmer, but new to Python, Panda, and game programming. Looking for sanity check/input:
My game has several modes (think mini games, or different modes like strategic vs. tactical modes). Each mode has different key binds, graphical elements, and largely different code controlling what's going on. The player will switch between these modes during normal course of play.
I feel compelled to somehow encapsulate their functionalities into separate objects, probably of some shared parent class. My first instinct is to create a child class of PandaNode that handles applying keybinds, transitioning between modes, etc. Then, each mode would be another child class of the main "mode" class, and when a mode switch happens, I simply detach (maybe lose references) to the previous "mode" node, and instantiate and attach the new mode.
Does this sound reasonable/sane? Is there a better/alternate approach?