Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
World.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "NonCopyable.hpp"
4 #include "Level.h"
5 
6 #include <string>
7 #include <vector>
8 #include <memory>
9 
10 namespace Fling
11 {
17  class World : public NonCopyable
18  {
19  public:
24  void Init();
25 
26  void Shutdown();
27 
31  void PreTick();
32 
38  void Update(float t_DeltaTime);
39 
44  void LoadLevel(const std::string& t_LevelPath);
45 
52  FORCEINLINE bool ShouldQuit() const { return m_ShouldQuit; }
53 
54  private:
55 
56  // #TODO: Pointer to the player!
57 
59  std::vector<std::unique_ptr<Level>> m_ActiveLevels;
60 
62  };
63 } // namespace Fling
void LoadLevel(const std::string &t_LevelPath)
Load a level into the world.
Definition: World.cpp:44
void Update(float t_DeltaTime)
Tick all active levels in the world.
Definition: World.cpp:30
UINT8 m_ShouldQuit
Definition: World.h:61
The world holds all active levels in the game.
Definition: World.h:17
FORCEINLINE bool ShouldQuit() const
Check if the world wants to exit the program.
Definition: World.h:52
std::vector< std::unique_ptr< Level > > m_ActiveLevels
Currently active levels in the world.
Definition: World.h:59
void PreTick()
Called before the first Update tick on the world.
Definition: World.cpp:25
void Init()
Initializes the world.
Definition: World.cpp:7
uint8_t UINT8
Definition: FlingTypes.h:8
Class that removes the copy operator and constructor.
Definition: NonCopyable.hpp:10
void Shutdown()
Definition: World.cpp:17
Definition: Engine.h:13