Responsible for Game Start, Game End, Load Resources, and window related functions.
More...
#include <Game.h>
|
static int | GetHeight () |
| Returns window's height in pixels.
|
|
static int | GetWidth () |
| Returns window's width in pixels.
|
|
static void | SetClear (float r, float g, float b, float a) |
| Sets window's background color to an RGBA value.
|
|
static void | SetClear (Vect color) |
| Sets window's background color using a vector.
|
|
static void | SetWidthHeight (int w, int h) |
| Directly sets width and height of the window in pixels.
|
|
static void | SetWidthHeightDefault () |
| Sets width and height of the window to be a quarter of the monitor size.
|
|
static void | SetWindowName (const char *name) |
| Sets window's name.
|
|
|
void | GameStart () |
| Fill GameStart.cpp with actions that should occur when the game is launched.
|
|
void | GameEnd () |
| Fill GameEnd.cpp with actions that should occur when the game is closed.
|
|
void | LoadResources () |
| Fill LoadResources.cpp with assets you want to load.
|
|
Responsible for Game Start, Game End, Load Resources, and window related functions.
◆ GameEnd()
Fill GameEnd.cpp with actions that should occur when the game is closed.
Example:
}
void GameEnd()
Fill GameEnd.cpp with actions that should occur when the game is closed.
◆ GameStart()
Fill GameStart.cpp with actions that should occur when the game is launched.
Example:
}
static void SetWidthHeightDefault()
Sets width and height of the window to be a quarter of the monitor size.
Definition Game.h:192
static void SetWindowName(const char *name)
Sets window's name.
Definition Game.h:198
void GameStart()
Fill GameStart.cpp with actions that should occur when the game is launched.
static void SetClear(float r, float g, float b, float a)
Sets window's background color to an RGBA value.
Definition Game.h:176
◆ GetHeight()
static int Game::GetHeight |
( |
| ) |
|
|
static |
Returns window's height in pixels.
- Returns
- int
◆ GetWidth()
static int Game::GetWidth |
( |
| ) |
|
|
static |
Returns window's width in pixels.
- Returns
- int
◆ LoadResources()
void Game::LoadResources |
( |
| ) |
|
|
private |
Fill LoadResources.cpp with assets you want to load.
- Warning
- A Start scene must be loaded here, or else an empty scene will be shown instead.
Example:
}
void LoadResources()
Fill LoadResources.cpp with assets you want to load.
static void Load(const MapKey &key, Texture *tex)
Image Model with KEY and TEXTURE.
Definition ImageManager.h:63
static void LoadModel(const MapKey &key, const std::string &path)
Load Model with KEY and FILE PATH.
Definition ModelManager.h:69
static void SetStartScene(Scene *start)
Sets pointer to start scene.
Definition SceneManager.h:64
static void LoadShader(const MapKey &key, const std::string &path)
Load Shader with KEY and FILE PATH.
Definition ShaderManager.h:63
static Texture * GetTexture(const MapKey &key)
Returns texture pointer with given KEY.
Definition TextureManager.h:134
static void LoadTexture(const MapKey &key, const std::string &path)
Load Texture with KEY and FILE PATH.
Definition TextureManager.h:100
◆ SetClear() [1/2]
static void Game::SetClear |
( |
float | r, |
|
|
float | g, |
|
|
float | b, |
|
|
float | a ) |
|
static |
Sets window's background color to an RGBA value.
- Parameters
-
◆ SetClear() [2/2]
static void Game::SetClear |
( |
Vect | color | ) |
|
|
static |
Sets window's background color using a vector.
- Parameters
-
◆ SetWidthHeight()
static void Game::SetWidthHeight |
( |
int | w, |
|
|
int | h ) |
|
static |
Directly sets width and height of the window in pixels.
- Parameters
-
◆ SetWidthHeightDefault()
static void Game::SetWidthHeightDefault |
( |
| ) |
|
|
static |
Sets width and height of the window to be a quarter of the monitor size.
◆ SetWindowName()
static void Game::SetWindowName |
( |
const char * | name | ) |
|
|
static |
Sets window's name.
- Parameters
-