AgateLib.AgateApplication Class Reference

Application framework for a game. Using AgateApplication can simplify the application source code and start up. More...

List of all members.

Public Member Functions

int Run ()
 Runs the application.
int Run (string[] args)
 Runs the application.
void Quit ()
 Closes the main window.

Protected Member Functions

virtual void Initialize ()
 Override Initialize() to do any needed initialization for your application, such as creating Surface objects.
virtual void Update (double time_ms)
 Override this method to update your game logic.
virtual void Render ()
 Override this method to render your game. Do not call Display.BeginFrame or Display.EndFrame.
virtual bool UpdateSplashScreen (double time_ms)
 Override this method to update the logic for a custom splash screen, if there are any animations. Return false to cancel the splash screen and move on.
virtual void RenderSplashScreen ()
 Override this method to provide a custom splash screen. This method is called before the Initialize method is called.
virtual AppInitParameters GetAppInitParameters ()
 Gets the initialization parameters.

Properties

virtual string ApplicationTitle [get]
 Override this to set the title of the window which is created.
virtual Size WindowSize [get]
virtual bool FullScreen [get]
DisplayWindow MainWindow [get]
 Gets the main display window.


Detailed Description

Application framework for a game. Using AgateApplication can simplify the application source code and start up.

            using AgateLib;

            namespace MyApplication
            {
                        class MyApp : AgateApplication
                        {
                                public static void Main(string[] args)
                                {
                                        new MyApp().Run(args);
                                }

                        protected override void Initialize()
                        {
                                // do any needed initialization, loading of surfaces, etc. here.
                                }
                                protected override void Update(double time_ms)
                                {
                                        // update game logic here.
                                }
                                protected override void Render()
                                {
                                        // render game here. 
                                }
                        }
            }

Member Function Documentation

virtual AppInitParameters AgateLib.AgateApplication.GetAppInitParameters (  )  [protected, virtual]

Gets the initialization parameters.

Returns:

virtual void AgateLib.AgateApplication.Initialize (  )  [protected, virtual]

Override Initialize() to do any needed initialization for your application, such as creating Surface objects.

void AgateLib.AgateApplication.Quit (  ) 

Closes the main window.

virtual void AgateLib.AgateApplication.Render (  )  [protected, virtual]

Override this method to render your game. Do not call Display.BeginFrame or Display.EndFrame.

Do not call Display.BeginFrame or Display.EndFrame or change render targets in this method.

virtual void AgateLib.AgateApplication.RenderSplashScreen (  )  [protected, virtual]

Override this method to provide a custom splash screen. This method is called before the Initialize method is called.

Parameters:
time_ms 

int AgateLib.AgateApplication.Run ( string[]  args  ) 

Runs the application.

Parameters:
args 
Returns:

int AgateLib.AgateApplication.Run (  ) 

Runs the application.

Returns:

virtual void AgateLib.AgateApplication.Update ( double  time_ms  )  [protected, virtual]

Override this method to update your game logic.

Parameters:
time_ms The amount of time that has passed since the last update, in milliseconds.

virtual bool AgateLib.AgateApplication.UpdateSplashScreen ( double  time_ms  )  [protected, virtual]

Override this method to update the logic for a custom splash screen, if there are any animations. Return false to cancel the splash screen and move on.

Parameters:
time_ms 


Property Documentation

virtual string AgateLib.AgateApplication.ApplicationTitle [get, protected]

Override this to set the title of the window which is created.

DisplayWindow AgateLib.AgateApplication.MainWindow [get]

Gets the main display window.


The documentation for this class was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo