Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Public Member Functions | Private Attributes
Fling::World Class Reference

The world holds all active levels in the game. More...

#include <World.h>

Inherits Fling::NonCopyable.

Public Member Functions

void Init ()
 Initializes the world. More...
 
void Shutdown ()
 
void PreTick ()
 Called before the first Update tick on the world. More...
 
void Update (float t_DeltaTime)
 Tick all active levels in the world. More...
 
void LoadLevel (const std::string &t_LevelPath)
 Load a level into the world. More...
 
FORCEINLINE bool ShouldQuit () const
 Check if the world wants to exit the program. More...
 
- Public Member Functions inherited from Fling::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=default
 
NonCopyableoperator= (const NonCopyable &)=delete
 
NonCopyableoperator= (NonCopyable &&)=default
 

Private Attributes

std::vector< std::unique_ptr< Level > > m_ActiveLevels
 Currently active levels in the world. More...
 
UINT8 m_ShouldQuit = false
 

Additional Inherited Members

- Protected Member Functions inherited from Fling::NonCopyable
 NonCopyable ()=default
 
virtual ~NonCopyable ()=default
 

Detailed Description

The world holds all active levels in the game.

There will only ever be exactly one World instance at any given time.

See also
Level

Member Function Documentation

◆ Init()

void Fling::World::Init ( )

Initializes the world.

Loads the StartLevel that is specified in the config.

Note
Keep explict Init and Shutdown functions to make the startup order more readable

◆ LoadLevel()

void Fling::World::LoadLevel ( const std::string &  t_LevelPath)

Load a level into the world.

Parameters
t_LevelPathThe path to the current level. (Relative to the assets dir)

◆ PreTick()

void Fling::World::PreTick ( )

Called before the first Update tick on the world.

◆ ShouldQuit()

FORCEINLINE bool Fling::World::ShouldQuit ( ) const
inline

Check if the world wants to exit the program.

See also
Engine::Tick
Returns
True if the world has signlaed for exit

◆ Shutdown()

void Fling::World::Shutdown ( )

◆ Update()

void Fling::World::Update ( float  t_DeltaTime)

Tick all active levels in the world.

Parameters
t_DeltaTimeTime between previous frame and the current one.

Field Documentation

◆ m_ActiveLevels

std::vector<std::unique_ptr<Level> > Fling::World::m_ActiveLevels
private

Currently active levels in the world.

◆ m_ShouldQuit

UINT8 Fling::World::m_ShouldQuit = false
private

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