Haven''t you guys ever heard of static functions? I guess not
. Static functions (and member variables) allow you to use the class directly instead of making an instance. For example, you could make your class like this:
class GameEngine{ protected: static int StaticVariable; int regularVariable; //read about this belowpublic: static void MainMenu (); static bool LoadLevel (int level); static void PlayLevel ();};//using class directly hereGameEngine.MainMenu();GameEngine.LoadLevel(1);GameEngine.PlayLevel();// ...
The only limitation of static member functions/variables is that you can''t access non static members, so in the MainMenu function you couldn''t access the variable regularVariable.
--TheGoop
BTW, in response to ga, OOP is neccasary often times. Especially if your working with many other programmers.