Entry point for all programs using the engine, must instantiate a game application for every new game. Use the macro getGameInstance() to get a pointer to the current game instance.
More...
#include <gameApplication.h>
Entry point for all programs using the engine, must instantiate a game application for every new game. Use the macro getGameInstance() to get a pointer to the current game instance.
- Warning
- This class is a singleton, all functions called operate on the same object.
- Author
- Thomas Montano
- Date
- March 2 2020
◆ changeScene()
void rune::GameApplication::changeScene |
( |
std::string const & |
newScene | ) |
|
Change the currently active scene.
- Parameters
-
newScene | The scene that should be made active. |
◆ getApplication()
◆ getCurrentScene()
Get a pointer to the currently active scene.
- Returns
- A pointer to the currently active scene.
◆ getDeltaTime()
double rune::GameApplication::getDeltaTime |
( |
void |
| ) |
|
Gets the change in time since the last frame in seconds.
- Returns
- The time in seconds since the last game tick.
◆ getFrameRate()
int rune::GameApplication::getFrameRate |
( |
void |
| ) |
|
Gets the number of frames since the last game tick.
- Returns
- The number of frames since the last game tick.
◆ getWindow()
Returns the reference to the currently active render window.
- Returns
- the reference to the currently active render window.
◆ loadScene()
void rune::GameApplication::loadScene |
( |
std::string const & |
sceneName, |
|
|
GameScene * |
newScene |
|
) |
| |
Loads in a scene file and stores it in the game application.
- Parameters
-
sceneName | A string that is used to refer back to the scene. |
newScene | A pointer to a GameScene object that should be loaded into the scene buffer. |
◆ run()
int rune::GameApplication::run |
( |
void |
| ) |
|
Starts the main game loop.
- Returns
- The generated error code
◆ m_errorCode
int rune::GameApplication::m_errorCode |
A code that will be returned when the application closes that says what happened if execution failed.
0 = Execution concluded successfully.
1 = A rune::GameScene had not been loaded into the application at run time.
The documentation for this class was generated from the following files: