| Fling Engine 0.00.1 Fling Engine is a game engine written in Vulkan

Public Member Functions | Protected Member Functions | Protected Attributes | Friends
Fling::Game Class Referenceabstract

The game class is mean to be overridden on a per-game instance. More...

`#include <Game.h>`

Inherits Fling::NonCopyable.

Inherited by Sandbox::Game.

## Public Member Functions
virtual void | Init (entt::registry &t_Reg)=0
| Called before the first Update tick. More...
virtual void | Shutdown (entt::registry &t_Reg)=0
virtual void | Update (entt::registry &t_Reg, float DeltaTime)=0
| Update is called every frame. More...
FORCEINLINE class World * | GetWorld () const
| Gets the owning world of this game. More...
FORCEINLINE bool | WantsToQuit () const
| If true then this game wants to texit the application entirely. More...
Public Member Functions inherited from Fling::NonCopyable
| NonCopyable (const NonCopyable &)=delete
| NonCopyable (NonCopyable &&)=default
NonCopyable & | operator= (const NonCopyable &)=delete
NonCopyable & | operator= (NonCopyable &&)=default

## Protected Member Functions
| Game ()=default
virtual | ~Game ()=default
Protected Member Functions inherited from Fling::NonCopyable
| NonCopyable ()=default
virtual | ~NonCopyable ()=default

## Protected Attributes
class World * | m_OwningWorld = nullptr
| The world that updates this game. More...
bool | m_WantsToQuit = false
| Change this value to true when the game is ready to exit the application entirely. More...

## Friends
class | Engine

## Detailed Description

The game class is mean to be overridden on a per-game instance.

It provides an interface for users to add their own System calls in the update, read, write, etc

See also
  World

## Constructor & Destructor Documentation

## ◆ Game()

Fling::Game::Game | ( |  | ) |
| protected default

## ◆ ~Game()

virtual Fling::Game::~Game | ( |  | ) |
| protected virtual default

## Member Function Documentation

## ◆ GetWorld()

FORCEINLINE class World* Fling::Game::GetWorld | ( |  | ) | const
| inline

Gets the owning world of this game.

You can use the world to add entities to the world. Asserts that world exists first

Returns
  FORCEINLINE* GetWorld

## ◆ Init()

void Sandbox::Game::Init | ( | entt::registry & | t_Reg | ) |
| pure virtual

Called before the first Update tick.

Implemented in Sandbox::Game.

## ◆ Shutdown()

void Sandbox::Game::Shutdown | ( | entt::registry & | t_Reg | ) |
| pure virtual

Implemented in Sandbox::Game.

## ◆ Update()

void Sandbox::Game::Update | ( | entt::registry & | t_Reg,
|  | float | DeltaTime
| ) |  |
| pure virtual

Update is called every frame.

Call any system updates for your gameplay systems inside of here

Implemented in Sandbox::Game.

## ◆ WantsToQuit()

FORCEINLINE bool Fling::Game::WantsToQuit | ( |  | ) | const
| inline

If true then this game wants to texit the application entirely.

Returns
  FORCEINLINE WantsToQuit

## Friends And Related Function Documentation

## ◆ Engine

friend class Engine
| friend

## Field Documentation

## ◆ m_OwningWorld

class World* Fling::Game::m_OwningWorld = nullptr
| protected

The world that updates this game.

Set in the Engine::Startup

## ◆ m_WantsToQuit

bool Fling::Game::m_WantsToQuit = false
| protected

Change this value to true when the game is ready to exit the application entirely.

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

- FlingEngine/Gameplay/inc/Game.h
- Sandbox/Gameplay/src/SandboxGame.cpp