This is meant to be a parent for other, app-specific, screen classes, which is essentially where all game mechanics will "happen", so to speak. This class decides what happens on updates, draws, when to go to different screens, etc.
More...
#include <Screen.hpp>
|
| | Screen () |
| |
| virtual | ~Screen () |
| |
| virtual void | initScreen ()=0 |
| | This is called once, at the start of the program, when the screen is added to the screen list. More...
|
| |
| virtual void | destroyScreen ()=0 |
| | Destroys the screen, called when the screen list is destroyed. More...
|
| |
| virtual void | onEntry ()=0 |
| | This is pretty close to the init function. It is called every time the screen is entered. More...
|
| |
| virtual void | onExit ()=0 |
| | This is close to the destroy function, but is only called when the screen is exited, not at the end of the program. More...
|
| |
| virtual void | draw ()=0 |
| | Draws anything and everything to the screen! More...
|
| |
| virtual void | update (double dt)=0 |
| | Updates all necessary things! More...
|
| |
| virtual int | getNextScreenIndex () const =0 |
| | Returns the index of the next screen. It is recommended to keep a file, say, ScreenIndices.h, where all indices are defined. More...
|
| |
| ScreenState | getState () |
| |
This is meant to be a parent for other, app-specific, screen classes, which is essentially where all game mechanics will "happen", so to speak. This class decides what happens on updates, draws, when to go to different screens, etc.
Definition at line 16 of file Screen.hpp.
◆ Screen()
| BARE2D::Screen::Screen |
( |
| ) |
|
◆ ~Screen()
| BARE2D::Screen::~Screen |
( |
| ) |
|
|
virtual |
◆ destroyScreen()
| virtual void BARE2D::Screen::destroyScreen |
( |
| ) |
|
|
pure virtual |
Destroys the screen, called when the screen list is destroyed.
◆ draw()
| virtual void BARE2D::Screen::draw |
( |
| ) |
|
|
pure virtual |
Draws anything and everything to the screen!
◆ getNextScreenIndex()
| virtual int BARE2D::Screen::getNextScreenIndex |
( |
| ) |
const |
|
pure virtual |
Returns the index of the next screen. It is recommended to keep a file, say, ScreenIndices.h, where all indices are defined.
- Returns
- Index of the next screen
Referenced by BARE2D::ScreenList::moveToNextScreen().
◆ getState()
◆ initScreen()
| virtual void BARE2D::Screen::initScreen |
( |
| ) |
|
|
pure virtual |
◆ onEntry()
| virtual void BARE2D::Screen::onEntry |
( |
| ) |
|
|
pure virtual |
◆ onExit()
| virtual void BARE2D::Screen::onExit |
( |
| ) |
|
|
pure virtual |
◆ update()
| virtual void BARE2D::Screen::update |
( |
double |
dt | ) |
|
|
pure virtual |
Updates all necessary things!
◆ m_screenState
The documentation for this class was generated from the following files: