Application Class Reference | |||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| virtual void | Initialize () |
| virtual void | Start () |
| virtual void | Stop () |
| virtual void | Terminate () |
| virtual void | Update (float deltaTime)=0 |
Member Function Documentation
| virtual void Application::Initialize | ( | ) | [virtual] |
This method is called by the engine after all other systems have been initialized. You can re-implement this in your main game class, and you can do any necessary initialization here. Avoid making use of other systems at this point, as they are not started yet. Generally, you would mostly initialize member variables in this method, and leave any advanced setup to the Start method
Reimplemented from System.
Definition at line 67 of file Application.h.
| virtual void Application::Start | ( | ) | [virtual] |
This method is called by the engine after all other systems have been started. You can re-implement this in your main game class, and you can do any necessary setup here. All the things you can't do in Initialize, you may do here, since all other systems will be started at this point, and the engine is fully up and running.
Reimplemented from System.
Definition at line 76 of file Application.h.
| virtual void Application::Stop | ( | ) | [virtual] |
Did you create any objects in the Start method? Or allocate some memory? If you did anything at all in Start that requires clean up, you need to do that here. This method is called before any other system is Stopped.
Reimplemented from System.
Definition at line 83 of file Application.h.
| virtual void Application::Terminate | ( | ) | [virtual] |
Most often you wouldn't do much in this method. Most, if not all, of the setup done in Initialize won't require cleanup, but if something does, this is the place to put it. This method is called before any other system is Terminated, but after all systems have been Stopped.
Reimplemented from System.
Definition at line 91 of file Application.h.
| virtual void Application::Update | ( | float | deltaTime | ) | [pure virtual] |
In this method, you perform the per frame update of your game. This includes calling Update on any systems you are using. This method is called by the engine every frame, and the time that has elapsed since it was last called is passed as a parameter. This value should be used in all relevant calculations, to ensure things run at the same logical speed regardless of the frame rate.
- Parameters:
-
deltaTime The time elapsed since last frame






