C# Class StarterKit.Game

Inheritance: OpenTK.GameWindow
ファイルを表示 Open project: swax/QuickFont Class Usage Examples

Public Methods

Method Description
Game ( ) : System

Creates a 800x600 window with the specified title.

Protected Methods

Method Description
OnLoad ( EventArgs e ) : void

Load resources here.

OnRenderFrame ( FrameEventArgs e ) : void

Called when it is time to render the next frame. Add your rendering code here.

OnResize ( EventArgs e ) : void

Called when your window is resized. Set your viewport here. It is also a good place to set up your projection matrix (which probably changes along when the aspect ratio of your window).

OnUpdateFrame ( FrameEventArgs e ) : void

Called when it is time to setup the next frame. Add you game logic here.

Private Methods

Method Description
KeyDown ( object sender, KeyboardKeyEventArgs keyEventArgs ) : void
Main ( ) : void
PrintCode ( string code, float &yOffset ) : void
PrintComment ( QFont font, string comment, QFontAlignment alignment, float &yOffset ) : void
PrintComment ( string comment, float &yOffset ) : void
PrintCommentWithLine ( QFont font, string comment, QFontAlignment alignment, float xOffset, float &yOffset ) : void
PrintCommentWithLine ( string comment, QFontAlignment alignment, float xOffset, float &yOffset ) : void
PrintWithBounds ( QFont font, string text, RectangleF bounds, QFontAlignment alignment, float &yOffset ) : void

Method Details

Game() public method

Creates a 800x600 window with the specified title.
public Game ( ) : System
return System

OnLoad() protected method

Load resources here.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs Not used.
return void

OnRenderFrame() protected method

Called when it is time to render the next frame. Add your rendering code here.
protected OnRenderFrame ( FrameEventArgs e ) : void
e FrameEventArgs Contains timing information.
return void

OnResize() protected method

Called when your window is resized. Set your viewport here. It is also a good place to set up your projection matrix (which probably changes along when the aspect ratio of your window).
protected OnResize ( EventArgs e ) : void
e System.EventArgs Not used.
return void

OnUpdateFrame() protected method

Called when it is time to setup the next frame. Add you game logic here.
protected OnUpdateFrame ( FrameEventArgs e ) : void
e FrameEventArgs Contains timing information for framerate independent logic.
return void