UGDK  0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ugdk::Engine Class Reference

The game engine. Manages scenes, time, and the Audio, Video, Input and Text managers. More...

#include <ugdk/base/engine.h>

Public Member Functions

AudioManageraudio_manager ()
 Returns a reference to the Audio Manager.
 
graphic::VideoManagervideo_manager ()
 Returns a reference to the Video Manager.
 
graphic::TextManagertext_manager ()
 Returns a reference to the Text Manager.
 
input::InputManagerinput_manager ()
 Returns a reference to the Input Manager.
 
time::TimeManagertime_handler ()
 Returns a reference to the Time Handler.
 
PathManagerpath_manager ()
 Returns a reference to the Path Manager.
 
base::ResourceManagerresource_manager ()
 Returns a reference to the Resource Manager.
 
LanguageManagerlanguage_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::SceneCurrentScene () const
 Returns the current scene.
 
void PopScene ()
 Removes the top scene.
 

Static Public Member Functions

static Enginereference ()
 Returns a pointer to the current Engine. Creates an Engine if there isn't one.
 

Detailed Description

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.

See Also
reference()

Constructor & Destructor Documentation

ugdk::Engine::~Engine ( )
inline

Member Function Documentation

AudioManager* ugdk::Engine::audio_manager ( )
inline

Returns a reference to the Audio Manager.

See Also
AudioManager
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.

Parameters
configurationA 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.

See Also
InputManager
LanguageManager* ugdk::Engine::language_manager ( )
inline

Returns a reference to the Language Manager.

See Also
LanguageManager
PathManager* ugdk::Engine::path_manager ( )
inline

Returns a reference to the Path Manager.

See Also
PathManager
void ugdk::Engine::PopScene ( )

Removes the top scene.

void ugdk::Engine::PushScene ( action::Scene scene)

Puts a scene onto the scene list, on top.

Parameters
sceneThe scene to be put.
void ugdk::Engine::quit ( )
inline

Stops the engine and clears the scene list.

static Engine* ugdk::Engine::reference ( )
inlinestatic

Returns a pointer to the current Engine. Creates an Engine if there isn't one.

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.

See Also
ResourceManager
void ugdk::Engine::Run ( )

Starts running the engine.

graphic::TextManager* ugdk::Engine::text_manager ( )
inline

Returns a reference to the Text Manager.

See Also
TextManager
time::TimeManager* ugdk::Engine::time_handler ( )
inline

Returns a reference to the Time Handler.

See Also
TimeManager
graphic::VideoManager* ugdk::Engine::video_manager ( )
inline

Returns a reference to the Video Manager.

See Also
VideoManager
Vector2D ugdk::Engine::window_size ( )

Returns the window dimensions.


The documentation for this class was generated from the following files: