UGDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
ugdk::Engine Class Reference

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

#include <engine.h>

List of all members.

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

Returns a reference to the Audio Manager.

See also:
AudioManager
uint32 ugdk::Engine::current_fps ( ) const [inline]

Returns the current running FPS.

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.

Returns a reference to the Input Manager.

See also:
InputManager

Returns a reference to the Language Manager.

See also:
LanguageManager

Returns a reference to the Path Manager.

See also:
PathManager

Removes the top 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 ( ) [inline, static]

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

Releases all the resouces allocated by the engine.

Returns a reference to the Resource Manager.

See also:
ResourceManager

Starts running the engine.

Returns a reference to the Text Manager.

See also:
TextManager

Returns a reference to the Time Handler.

See also:
TimeManager

Returns a reference to the Video Manager.

See also:
VideoManager

Returns the window dimensions.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines