UGDK
|
The game engine. Manages scenes, time, and the Audio, Video, Input and Text managers. More...
#include <engine.h>
Public Member Functions | |
AudioManager * | audio_manager () |
Returns a reference to the Audio Manager. | |
graphic::VideoManager * | video_manager () |
Returns a reference to the Video Manager. | |
graphic::TextManager * | text_manager () |
Returns a reference to the Text Manager. | |
input::InputManager * | input_manager () |
Returns a reference to the Input Manager. | |
time::TimeManager * | time_handler () |
Returns a reference to the Time Handler. | |
PathManager * | path_manager () |
Returns a reference to the Path Manager. | |
base::ResourceManager * | resource_manager () |
Returns a reference to the Resource Manager. | |
LanguageManager * | language_manager () |
Returns a reference to the Language Manager. | |
Vector2D | window_size () |
Returns the window dimensions. | |
uint32 | current_fps () const |
Returns the current running FPS. | |
void | quit () |
Stops the engine and clears the scene list. | |
~Engine () | |
Engine Management | |
bool | Initialize (const Configuration &configuration) |
Initializes the engine. Returns true if sucessful, false otherwise. | |
bool | Initialize () |
Initializes the engine. Calls the other Initialize method with all default arguments. | |
void | Run () |
Starts running the engine. | |
void | Release () |
Releases all the resouces allocated by the engine. | |
Scene Management | |
void | PushScene (action::Scene *scene) |
Puts a scene onto the scene list, on top. | |
action::Scene * | CurrentScene () const |
Returns the current scene. | |
void | PopScene () |
Removes the top scene. | |
Static Public Member Functions | |
static Engine * | reference () |
Returns a pointer to the current Engine. Creates an Engine if there isn't one. |
The game engine. Manages scenes, time, and the Audio, Video, Input and Text managers.
Engine is a singleton. Use Engine::reference to get a pointer to an engine.
ugdk::Engine::~Engine | ( | ) | [inline] |
AudioManager* ugdk::Engine::audio_manager | ( | ) | [inline] |
Returns a reference to the Audio Manager.
uint32 ugdk::Engine::current_fps | ( | ) | const [inline] |
Returns the current running FPS.
action::Scene * ugdk::Engine::CurrentScene | ( | ) | const |
Returns the current scene.
bool ugdk::Engine::Initialize | ( | const Configuration & | configuration | ) |
Initializes the engine. Returns true if sucessful, false otherwise.
configuration | A Engine::Configuration struct with the planned configuration. |
bool ugdk::Engine::Initialize | ( | ) | [inline] |
Initializes the engine. Calls the other Initialize method with all default arguments.
input::InputManager* ugdk::Engine::input_manager | ( | ) | [inline] |
Returns a reference to the Input Manager.
LanguageManager* ugdk::Engine::language_manager | ( | ) | [inline] |
Returns a reference to the Language Manager.
PathManager* ugdk::Engine::path_manager | ( | ) | [inline] |
Returns a reference to the Path Manager.
void ugdk::Engine::PopScene | ( | ) |
Removes the top scene.
void ugdk::Engine::PushScene | ( | action::Scene * | scene | ) |
Puts a scene onto the scene list, on top.
scene | The scene to be put. |
void ugdk::Engine::quit | ( | ) | [inline] |
Stops the engine and clears the scene list.
static Engine* ugdk::Engine::reference | ( | ) | [inline, static] |
void ugdk::Engine::Release | ( | ) |
Releases all the resouces allocated by the engine.
base::ResourceManager* ugdk::Engine::resource_manager | ( | ) | [inline] |
Returns a reference to the Resource Manager.
void ugdk::Engine::Run | ( | ) |
Starts running the engine.
graphic::TextManager* ugdk::Engine::text_manager | ( | ) | [inline] |
Returns a reference to the Text Manager.
time::TimeManager* ugdk::Engine::time_handler | ( | ) | [inline] |
Returns a reference to the Time Handler.
graphic::VideoManager* ugdk::Engine::video_manager | ( | ) | [inline] |
Returns a reference to the Video Manager.
Returns the window dimensions.