![]() |
Castle Battle
1.0
|
Application will set up Launcher screen, and start the loop through GameManager. More...
#include <Application.h>
Public Member Functions | |
Application () | |
Names. More... | |
bool | loop () |
Main loop of the application. More... | |
void | createWorldEnviroment () |
Create physics and graphics scene. More... | |
bool | init () |
Start the launcher screen, and will wait the start button click event. More... | |
bool | end () |
Last stage of application. More... | |
Private Attributes | |
IrrlichtDevice * | device |
Irrlicht device instance. More... | |
video::IVideoDriver * | driver |
Irrlicht video instance. More... | |
scene::ISceneManager * | smgr |
Irrlicht scene manager instance. More... | |
Physics * | physics |
Physics instance. More... | |
GameManager * | gameManager |
GameManager instance. More... | |
gui::IGUIEnvironment * | gui |
Gui enviroment to build gui objects. More... | |
Terrain * | terrain |
Terrain of the world. More... | |
Launcher * | screen |
GUI handler. More... | |
Application will set up Launcher screen, and start the loop through GameManager.
In particular this class will init Irrlicht world and will add physics provided by Physics. Also it will show and handle the first launcher screen.
Application::Application | ( | ) |
Names.
Default constructor. Given the video driver from command line, the constructor will start all instances, initialize logger, start launcher and create world
void Application::createWorldEnviroment | ( | ) |
Create physics and graphics scene.
bool Application::end | ( | ) |
Last stage of application.
Show end screen
Free memory
From Irrlicht docs:. This method can free a lot of memory! Please note that after calling this, the pointer to the ITexture may no longer be valid, if it was not grabbed before by other parts of the engine for storing it longer. So it is a good idea to set all materials which are using this texture to 0 or another texture first.
Clear every scene node
Remove bullet memory
bool Application::init | ( | ) |
Start the launcher screen, and will wait the start button click event.
bool Application::loop | ( | ) |
Main loop of the application.
|
private |
Irrlicht device instance.
|
private |
Irrlicht video instance.
|
private |
GameManager instance.
|
private |
Gui enviroment to build gui objects.
|
private |
GUI handler.
|
private |
Irrlicht scene manager instance.