The Wraith engine class is the core aspect of the program that runs everything. It also offers settings for the window display.
More...
The Wraith engine class is the core aspect of the program that runs everything. It also offers settings for the window display.
Useful tool for users include functions to set the window dimensions (width and height), background color, and name for the window (All of which should be called in the GameInitialize.cpp file). Users can also access the window width and height.
Here is an example of how these tools are used: NOTE: You must include Wraith.h header file to acesss Wraith functions.
\\ in GameInitialize.cpp
#include "Wraith.h"
{
}
\\ in HUD.cpp (a user defined object)
#include "Wraith.h"
#include "Sprite.h"
HUD::HUD
{
_pHealthBarSprite =
new Sprite(
"HealthBarImage");
_pHealthBarSprite->setPosition(xPosition, yPosition);
}
A sprite used to display 2D images.
Definition: Sprite.h:18
void gameInitialize()
User defined are for initializing the game.
static void SetBackgroundColor(const float red, const float green, const float blue, const float alpha)
Sets background color of the window.
Definition: Wraith.h:149
static void SetWindowName(const char *windowName)
Sets window name.
Definition: Wraith.h:121
static void SetWindowWidthAndHeight(const int windowWidth, const int windowHeight)
Sets window width and height.
Definition: Wraith.h:134
static int GetWindowHeight()
Gets window height.
Definition: Wraith.h:173
static int GetWindowWidth()
Gets window width.
Definition: Wraith.h:161
◆ GetWindowHeight()
static int Wraith::GetWindowHeight |
( |
| ) |
|
|
inlinestatic |
Gets window height.
- Returns
- The window height.
◆ GetWindowWidth()
static int Wraith::GetWindowWidth |
( |
| ) |
|
|
inlinestatic |
Gets window width.
- Returns
- The window width.
◆ SetBackgroundColor()
static void Wraith::SetBackgroundColor |
( |
const float |
red, |
|
|
const float |
green, |
|
|
const float |
blue, |
|
|
const float |
alpha |
|
) |
| |
|
inlinestatic |
Sets background color of the window.
- Parameters
-
red | The red value. |
green | The green value. |
blue | The blue value. |
alpha | The alpha value. |
◆ SetWindowName()
static void Wraith::SetWindowName |
( |
const char * |
windowName | ) |
|
|
inlinestatic |
Sets window name.
Steven, 2/27/2021.
- Parameters
-
windowName | Name of the window. |
◆ SetWindowWidthAndHeight()
static void Wraith::SetWindowWidthAndHeight |
( |
const int |
windowWidth, |
|
|
const int |
windowHeight |
|
) |
| |
|
inlinestatic |
Sets window width and height.
- Parameters
-
windowWidth | Width of the window. |
windowHeight | Height of the window. |