Difference between revisions of "Game (Chili Framework)"
From Chilipedia
(Created page with "The <code>Game</code> class is where you put the code to make the game do the things. The predefined member functions <code>UpdateModel()</code> and <code>ComposeFrame()</code...") |
|||
Line 1: | Line 1: | ||
The <code>Game</code> class is where you put the code to make the game do the things. The predefined member functions <code>UpdateModel()</code> and <code>ComposeFrame()</code> are where you put your game logic and your rendering code, respectively. <code>Game</code> is composed of the <code>Graphics</code> object used for drawing and keeps a reference to the <code>MainWindow</code> object to interface with the Windows system (which includes the keyboard and mouse inputs). | The <code>Game</code> class is where you put the code to make the game do the things. The predefined member functions <code>UpdateModel()</code> and <code>ComposeFrame()</code> are where you put your game logic and your rendering code, respectively. <code>Game</code> is composed of the <code>Graphics</code> object used for drawing and keeps a reference to the <code>MainWindow</code> object to interface with the Windows system (which includes the keyboard and mouse inputs). | ||
+ | |||
+ | == Members == | ||
+ | |||
+ | === Game (constructor) === | ||
+ | |||
+ | <code>Game::Game( class MainWindow& wnd )</code><br /> | ||
+ | |||
+ | Gets called when the Game object is created and creates the Graphics object. Put your initialization code here and it gets executed once at the start of the program. Good deal. |
Revision as of 13:09, 13 July 2016
The Game
class is where you put the code to make the game do the things. The predefined member functions UpdateModel()
and ComposeFrame()
are where you put your game logic and your rendering code, respectively. Game
is composed of the Graphics
object used for drawing and keeps a reference to the MainWindow
object to interface with the Windows system (which includes the keyboard and mouse inputs).
Members
Game (constructor)
Game::Game( class MainWindow& wnd )
Gets called when the Game object is created and creates the Graphics object. Put your initialization code here and it gets executed once at the start of the program. Good deal.