1 #ifndef DENGINE_GAMELEVEL_H 2 #define DENGINE_GAMELEVEL_H 34 virtual void Load() = 0;
54 virtual void Start() = 0;
59 virtual void Pause() = 0;
74 virtual std::weak_ptr <GameObject>
GetObject(std::string gameObjectName);
102 std::vector <std::shared_ptr<GameObject>>
objects;
107 #endif //DENGINE_GAMELEVEL_H A base object for a game The gameobject can be considered the most basic building block of a game...
Definition: GameObject.h:19
void StartObjects()
Calls the start method on any registered objects.
Definition: GameLevel.cpp:49
bool started
Is true if Start has already ran.
Definition: GameLevel.h:101
A level of the game.
Definition: GameLevel.h:19
virtual void Update()=0
Used for performing logic updates.
virtual std::weak_ptr< GameObject > GetObject(std::string gameObjectName)
Retrieves a pointer to the object from the level.
Definition: GameLevel.cpp:38
virtual void UnLoad()=0
Used for removing assets from memory.
virtual ~GameLevel()
Cleans up and removes any memory allocated by GameLevel.
Definition: GameLevel.cpp:9
GameLevel()
Creates a new gamelevel.
Definition: GameLevel.cpp:7
std::vector< std::shared_ptr< GameObject > > newObjects
Definition: GameLevel.h:103
virtual void Load()=0
Used for loading assets into memory.
std::vector< std::shared_ptr< GameObject > > objects
Definition: GameLevel.h:102
virtual void UpdateObjects()
Calls the Update method on any registered objects.
Definition: GameLevel.cpp:57
virtual std::weak_ptr< GameObject > AddObject(GameObject *go)
Adds an object to the level.
Definition: GameLevel.cpp:14
virtual std::weak_ptr< GameObject > GetObjectByComponent(std::string componentName)
Retrieves an object from the level based on if it has a component or not.
Definition: GameLevel.cpp:25
virtual void Render()=0
Used for rendering graphics, text and more.
virtual void RenderObjects()
Calls the Render method on any registered objects.
Definition: GameLevel.cpp:70
virtual void Resume()=0
Resumes the game.
The namespace containing the engine's code.
Definition: Collider.h:9
virtual void Pause()=0
Pauses the game.
virtual void Start()=0
Called at instantiation.