Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
Public Member Functions | Static Public Member Functions | List of all members
Engine::Engine Class Reference

#include <engine.hpp>

Public Member Functions

eastl::weak_ptr< WindowGetWindow () noexcept
 This method allows you to get a weak pointer of the Window. This method will automatically create the engine for you based on the defined renderer type. More...
 
template<typename WindowType >
eastl::weak_ptr< WindowType > GetWindow ()
 This method allows you to get a weak pointer of the Window based on the defined WindowType. More...
 
eastl::weak_ptr< WindowCreateAndReturnWindow (int width, int height, const char *title) noexcept
 This method will initialize the window class for you, based on the defined renderer type. More...
 
eastl::weak_ptr< InputManagerGetInputManager () noexcept
 This method allows you to get a weak pointer of the input manager. If it hasn't been defined yet, it'll be created for you. More...
 
eastl::weak_ptr< RendererGetRenderer () noexcept
 This method allows you to get a weak pointer of the renderer. If it hasn't been defined yet, it'll be created for you based on the defined renderer type. More...
 
template<typename RendererType >
eastl::weak_ptr< RendererType > GetRenderer ()
 This method allows you to get a weak pointer of the renderer based on the defined RendererType. If it hasn't been defined yet, it'll be created for you based on the defined renderer type. More...
 
eastl::weak_ptr< CameraGetCamera () noexcept
 This method allows you to get a weak pointer of the main camera object. If it hasn't been defined yet, it'll be created for you. More...
 
eastl::weak_ptr< TimeGetTime () noexcept
 This method allows you to get a weak pointer of the time object. If it hasn't been defined yet, it'll be created for you. More...
 
eastl::weak_ptr< EntitySystemGetEntitySystem () const noexcept
 This method allows you to get a weak pointer of the entity system. If it hasn't been defined yet, it'll be created for you. More...
 
eastl::weak_ptr< ResourceManagerGetResourceManager () const noexcept
 This method allows you to get a weak pointer of the resource manager. If it hasn't been defined yet, it'll be created for you. More...
 
eastl::weak_ptr< CollisionSystemGetCollisionSystem () const noexcept
 This method allows you to get a weak pointer of the collision system. If it hasn't been defined yet, it'll be created for you. More...
 
eastl::weak_ptr< RandomGetRandom ()
 this method allows you to get a weak pointer of the Random class object More...
 
void Update () noexcept
 The general update method of the entire engine system. Call this from your main loop. More...
 
void Destroy () noexcept
 This method destroys the entire engine for you. Call this method after your main loop is finished. More...
 
void SetIsPlaying (bool isPlaying)
 This method allows you to pause or play the game based on the assigned value. More...
 
bool GetIsPlaying ()
 This method allows you to get the current status of the engine. More...
 
 ~Engine ()=default
 

Static Public Member Functions

static eastl::weak_ptr< EngineInitializeEngine (bool isPlaying=true) noexcept
 This method allows you to initialize the Engine. More...
 
static eastl::weak_ptr< EngineGetEngine () noexcept
 This method allows you to get the instance of the Engine. This method will automatically initialize the Engine if it hasn't been initialized yet. More...
 

Detailed Description

Definition at line 41 of file engine.hpp.

Constructor & Destructor Documentation

Engine::Engine::~Engine ( )
default

Member Function Documentation

eastl::weak_ptr< Window > Engine::Engine::CreateAndReturnWindow ( int  width,
int  height,
const char *  title 
)
noexcept

This method will initialize the window class for you, based on the defined renderer type.

Parameters
widthThe width of the window.
heightThe height of the window.
titleThe title of the window.
Returns
Returns a weak pointer of the window.

Definition at line 28 of file engine.cpp.

void Engine::Engine::Destroy ( )
noexcept

This method destroys the entire engine for you. Call this method after your main loop is finished.

Definition at line 162 of file engine.cpp.

eastl::weak_ptr< Camera > Engine::Engine::GetCamera ( )
noexcept

This method allows you to get a weak pointer of the main camera object. If it hasn't been defined yet, it'll be created for you.

Returns
Returns the camera as a weak pointer.

Definition at line 69 of file engine.cpp.

eastl::weak_ptr< CollisionSystem > Engine::Engine::GetCollisionSystem ( ) const
noexcept

This method allows you to get a weak pointer of the collision system. If it hasn't been defined yet, it'll be created for you.

Returns
Returns a weak pointer of the collision system.

Definition at line 103 of file engine.cpp.

eastl::weak_ptr< Engine > Engine::Engine::GetEngine ( )
staticnoexcept

This method allows you to get the instance of the Engine. This method will automatically initialize the Engine if it hasn't been initialized yet.

Returns
Returns a weak pointer of the Engine instance.

Definition at line 130 of file engine.cpp.

eastl::weak_ptr< EntitySystem > Engine::Engine::GetEntitySystem ( ) const
noexcept

This method allows you to get a weak pointer of the entity system. If it hasn't been defined yet, it'll be created for you.

Returns
Returns a weak pointer of the entity system.

Definition at line 89 of file engine.cpp.

eastl::weak_ptr< InputManager > Engine::Engine::GetInputManager ( )
noexcept

This method allows you to get a weak pointer of the input manager. If it hasn't been defined yet, it'll be created for you.

Returns
Returns the input manager as a weak pointer.

Definition at line 40 of file engine.cpp.

bool Engine::Engine::GetIsPlaying ( )

This method allows you to get the current status of the engine.

Returns
Will return true if the engine is in play mode.

Definition at line 184 of file engine.cpp.

eastl::weak_ptr< Random > Engine::Engine::GetRandom ( )

this method allows you to get a weak pointer of the Random class object

Returns
Returns a weak pointer to Random class object

Definition at line 47 of file engine.cpp.

eastl::weak_ptr< Renderer > Engine::Engine::GetRenderer ( )
noexcept

This method allows you to get a weak pointer of the renderer. If it hasn't been defined yet, it'll be created for you based on the defined renderer type.

Returns
Returns the renderer as a weak pointer.

Definition at line 54 of file engine.cpp.

template<typename RendererType >
eastl::weak_ptr< RendererType > Engine::Engine::GetRenderer ( )

This method allows you to get a weak pointer of the renderer based on the defined RendererType. If it hasn't been defined yet, it'll be created for you based on the defined renderer type.

Returns
Returns a weak pointer of the renderer if possible. Otherwise it'll return an expired weak pointer.

Definition at line 212 of file engine.hpp.

eastl::weak_ptr< ResourceManager > Engine::Engine::GetResourceManager ( ) const
noexcept

This method allows you to get a weak pointer of the resource manager. If it hasn't been defined yet, it'll be created for you.

Returns
Returns a weak pointer of the resource manager.

Definition at line 96 of file engine.cpp.

eastl::weak_ptr< Time > Engine::Engine::GetTime ( )
noexcept

This method allows you to get a weak pointer of the time object. If it hasn't been defined yet, it'll be created for you.

Returns
Returns a weak pointer of the time object.

Definition at line 82 of file engine.cpp.

eastl::weak_ptr< Window > Engine::Engine::GetWindow ( )
noexcept

This method allows you to get a weak pointer of the Window. This method will automatically create the engine for you based on the defined renderer type.

Returns
Returns a weak pointer of the defined renderer type.

Definition at line 23 of file engine.cpp.

template<typename WindowType >
eastl::weak_ptr< WindowType > Engine::Engine::GetWindow ( )

This method allows you to get a weak pointer of the Window based on the defined WindowType.

Returns
Returns a weak pointer of the defined renderer type if possible. Will return an expired weak pointer if it's not the initialized WindowType.

Definition at line 201 of file engine.hpp.

eastl::weak_ptr< Engine > Engine::Engine::InitializeEngine ( bool  isPlaying = true)
staticnoexcept

This method allows you to initialize the Engine.

Parameters
isPlayingThis value will defined if the engine should start in play mode. True by default
Returns
Returns a weak pointer of the Engine.

Definition at line 110 of file engine.cpp.

void Engine::Engine::SetIsPlaying ( bool  isPlaying)

This method allows you to pause or play the game based on the assigned value.

Parameters
isPlayingThis wil change the engine to pause or play mode based on your value.

Definition at line 179 of file engine.cpp.

void Engine::Engine::Update ( )
noexcept

The general update method of the entire engine system. Call this from your main loop.

Definition at line 137 of file engine.cpp.


The documentation for this class was generated from the following files: