Platformer
Platformer
Public Member Functions | Private Attributes | List of all members
GameWorld Class Reference

This class represents the game world. More...

#include <GameWorld.hpp>

Collaboration diagram for GameWorld:
Collaboration graph

Public Member Functions

 GameWorld ()
 Constructs a GameWorld.
 
void Update ()
 Updates this world.
 
std::vector< std::shared_ptr< GameObject > > GetActiveObjects () const
 Gets the list of all active objects in our world. More...
 
void RegisterObject (std::shared_ptr< GameObject > obj)
 Registers an object in the world. More...
 

Private Attributes

std::vector< std::shared_ptr< GameObject > > objects
 The list of all objects in the world.
 

Detailed Description

This class represents the game world.

It has a list of all the objects the world contains.

Member Function Documentation

◆ GetActiveObjects()

std::vector< std::shared_ptr< GameObject > > GameWorld::GetActiveObjects ( ) const

Gets the list of all active objects in our world.

Returns
The list of all active objects

◆ RegisterObject()

void GameWorld::RegisterObject ( std::shared_ptr< GameObject obj)

Registers an object in the world.

Parameters
objThe object to be registered

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