The Game class to use the Fireworks Engine.
More...
#include <fireworks.h>
|
| void | start () |
| | A function that starts the main game loop. More...
|
| |
The Game class to use the Fireworks Engine.
It is the main class from which the game class must be derived from to use the fireworks engine
◆ Fireworks()
| fireworks::Fireworks::Fireworks |
( |
| ) |
|
|
inlineprotected |
◆ ~Fireworks()
| virtual fireworks::Fireworks::~Fireworks |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ createWindow()
| graphics::Window* fireworks::Fireworks::createWindow |
( |
const char * |
name, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
|
inlineprotected |
A function to create the Main Window.
- Parameters
-
| name | The name of the window |
| width | The width of the window |
| height | The height of the window |
- Returns
- An pointer object to the currently created of type graphics::Window Use this object to set properties of the window and control the input
- See also
- graphics::Window for more details on using/seeting the window properties
◆ getFPS()
| const unsigned int fireworks::Fireworks::getFPS |
( |
| ) |
|
|
inlineprotected |
A function to get the current FPS : Frames per second .
- Returns
- Returns the current FPS of type unsigned int
◆ getUPS()
| const unsigned int fireworks::Fireworks::getUPS |
( |
| ) |
|
|
inlineprotected |
A function to get the current UPS : Updates per second .
We usually want the number of updates to be around 60 per second
- Returns
- Returns the current UPS of type unsigned int
◆ init()
| virtual void fireworks::Fireworks::init |
( |
| ) |
|
|
protectedpure virtual |
Runs once per initialization.
◆ render()
| virtual void fireworks::Fireworks::render |
( |
| ) |
|
|
protectedpure virtual |
Runs as fast as possible.
◆ start()
| void fireworks::Fireworks::start |
( |
| ) |
|
|
inline |
A function that starts the main game loop.
- Attention
- The main class the derives from fireworks::Fireworks must use this method (in main.cpp) to start the game
◆ tick()
| virtual void fireworks::Fireworks::tick |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ update()
| virtual void fireworks::Fireworks::update |
( |
| ) |
|
|
inlineprotectedvirtual |
Runs 60 times per second.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/fireworks-engine/checkouts/latest/Fireworks Engine/Fireworks Core/fireworks.h