#include <Sly.h>
|
static void | Run () |
| Kick starts the engine. Begins by loading the framework followed by initializing the Sly Engine. More...
|
|
static int | GetHeight () |
| Gets the window height. More...
|
|
static int | GetWidth () |
| Gets the window width. More...
|
|
static void | SetClear (float r, float g, float b, float a) |
| Sets the color to clear the screen with. More...
|
|
static void | SetWidthHeight (int w, int h) |
| Sets width and height of the main window. More...
|
|
static void | SetWindowName (const char *name) |
| Sets window name. More...
|
|
|
| Sly ()=default |
| Default constructor. More...
|
|
| Sly (const Sly &)=delete |
| Copy constructor. More...
|
|
| Sly (Sly &&)=delete |
| Move constructor. More...
|
|
Sly & | operator= (const Sly &)=delete |
| Assignment operator. More...
|
|
Sly & | operator= (Sly &&)=delete |
| Move assignment operator. More...
|
|
| ~Sly ()=default |
| Deconstructor. More...
|
|
virtual void | Initialize () |
| Engine initialization. Setups up various managers. More...
|
|
virtual void | LoadContent () |
| Loads engine starting content. Loads first scene. More...
|
|
virtual void | Update () |
| Main update loop. More...
|
|
virtual void | Draw () |
| Main draw loop. More...
|
|
virtual void | UnLoadContent () |
| Cleans up engine content. More...
|
|
int | privGetHeight () |
| Internal get height, pulls height from Azul framework. More...
|
|
int | privGetWidth () |
| Internal get width, pulls width from Azul framework. More...
|
|
void | privSetClear (float r, float g, float b, float a) |
| Internal set clear. Passes values to Azul framework. More...
|
|
void | privSetWidthHeight (int w, int h) |
| Internal set Width and Height, passes values to Azul framework. More...
|
|
void | privSetWindowName (const char *name) |
| Internal set window name. Passes this info to the Azul framework. More...
|
|
| Sly (const char *windowName, const int Width, const int Height) |
| Legacy Constructor. More...
|
|
void | LoadAllResources () |
| User defined LoadResources. Content to be defined by the user. Typically models, textures, and shaders are loaded here. More...
|
|
void | GameInitialize () |
| Game initialize, window and engine modifications to be defined by the user.
More...
|
|
void | GameEnd () |
| Game end, to be defined by the user. Typically used for cleaning up memory. More...
|
|
float | privGetTime () |
| Gets internal time. More...
|
|
◆ Sly() [1/4]
◆ Sly() [2/4]
◆ Sly() [3/4]
◆ ~Sly()
◆ Sly() [4/4]
Sly::Sly |
( |
const char * |
windowName, |
|
|
const int |
Width, |
|
|
const int |
Height |
|
) |
| |
|
private |
Legacy Constructor.
- Parameters
-
windowName | Name of the window. |
Width | The width. |
Height | The height. |
◆ Draw()
Main draw loop.
Calls internal systems to process their draw loops. Routed through the SceneManager.
◆ GameEnd()
Game end, to be defined by the user. Typically used for cleaning up memory.
BulletFactory::Terminate();
TankFactory::Terminate();
}
◆ GameInitialize()
void Sly::GameInitialize |
( |
| ) |
|
|
private |
Game initialize, window and engine modifications to be defined by the user.
this->setWindowName("Sly Engine");
this->setWidthHeight(800, 600);
this->SetClearColor(0.4f, 0.4f, 0.8f, 1.0f);
}
◆ GetHeight()
static int Sly::GetHeight |
( |
| ) |
|
|
inlinestatic |
Gets the window height.
- Returns
- The height.
◆ GetTime()
static float Sly::GetTime |
( |
| ) |
|
|
inlinestaticprivate |
Gets the time.
To be used by internal processes. Specifically, passes current time info to the TimeManager. Not user accessible, all calls for time should be routed through the TimeManager.
- Returns
- The time.
◆ GetWidth()
static int Sly::GetWidth |
( |
| ) |
|
|
inlinestatic |
Gets the window width.
- Returns
- The width.
◆ Initialize()
Engine initialization. Setups up various managers.
◆ Instance()
static Sly & Sly::Instance |
( |
| ) |
|
|
inlinestaticprivate |
Gets the instance.
- Returns
- A reference to a Sly.
◆ LoadAllResources()
void Sly::LoadAllResources |
( |
| ) |
|
|
private |
User defined LoadResources. Content to be defined by the user. Typically models, textures, and shaders are loaded here.
◆ LoadContent()
void Sly::LoadContent |
( |
| ) |
|
|
privatevirtual |
Loads engine starting content. Loads first scene.
◆ operator=() [1/2]
Sly& Sly::operator= |
( |
const Sly & |
| ) |
|
|
privatedelete |
◆ operator=() [2/2]
Sly& Sly::operator= |
( |
Sly && |
| ) |
|
|
privatedelete |
Move assignment operator.
◆ privGetHeight()
int Sly::privGetHeight |
( |
| ) |
|
|
private |
Internal get height, pulls height from Azul framework.
- Returns
- An int.
◆ privGetTime()
float Sly::privGetTime |
( |
| ) |
|
|
private |
Gets internal time.
Accesses the Azul framework to retrieve the time.
- Returns
- The time.
◆ privGetWidth()
int Sly::privGetWidth |
( |
| ) |
|
|
private |
Internal get width, pulls width from Azul framework.
- Returns
- An int.
◆ privSetClear()
void Sly::privSetClear |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b, |
|
|
float |
a |
|
) |
| |
|
private |
Internal set clear. Passes values to Azul framework.
- Parameters
-
r | A float to process. |
g | A float to process. |
b | A float to process. |
a | A float to process. |
◆ privSetWidthHeight()
void Sly::privSetWidthHeight |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
private |
Internal set Width and Height, passes values to Azul framework.
- Parameters
-
◆ privSetWindowName()
void Sly::privSetWindowName |
( |
const char * |
name | ) |
|
|
private |
Internal set window name. Passes this info to the Azul framework.
- Parameters
-
◆ Run()
Kick starts the engine. Begins by loading the framework followed by initializing the Sly Engine.
◆ SetClear()
static void Sly::SetClear |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b, |
|
|
float |
a |
|
) |
| |
|
inlinestatic |
Sets the color to clear the screen with.
- Parameters
-
r | red. |
g | green. |
b | blue. |
a | alpha. |
◆ SetWidthHeight()
static void Sly::SetWidthHeight |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
inlinestatic |
Sets width and height of the main window.
- Parameters
-
◆ SetWindowName()
static void Sly::SetWindowName |
( |
const char * |
name | ) |
|
|
inlinestatic |
Sets window name.
- Parameters
-
name | The name of the window. |
◆ UnLoadContent()
void Sly::UnLoadContent |
( |
| ) |
|
|
privatevirtual |
Cleans up engine content.
◆ Update()
◆ SlyAttorney
◆ ptrInstance
Sly * Sly::ptrInstance = nullptr |
|
staticprivate |
The documentation for this class was generated from the following files:
static void Load(std::string key, const char *path)
Loads the specified shader.
Definition: ShaderManager.h:104
static void Load(std::string key, const char *path)
Loads the texture.
Definition: TextureManager.h:107