Annwvyn::AnnLevel Class Referenceabstract

Base class for all Levels. Is abstract. More...

#include <AnnLevel.hpp>

Inheritance diagram for Annwvyn::AnnLevel:
Collaboration diagram for Annwvyn::AnnLevel:

Public Member Functions

 AnnLevel ()
 Construct the level. More...
 
virtual void load ()=0
 Pure virtual methods that loads the level. More...
 
virtual ~AnnLevel ()
 Destroy the level. More...
 
virtual void unload ()
 Unload the level by destroying every objects in "levelContent" and every lights in "levelLighting". More...
 
virtual void runLogic ()=0
 Run logic code from the level. More...
 
AnnGameObjectListgetContent ()
 Get the list of objects. More...
 
AnnLightListgetLights ()
 Get the list of lights. More...
 
AnnTriggerObjectListgetTriggers ()
 Get the list of triggers. More...
 

Protected Member Functions

std::shared_ptr< AnnLightObjectaddLightObject (std::string id="")
 Add a light object to the level. More...
 
std::shared_ptr< AnnTriggerObjectaddTrggerObject (std::string id="")
 Add a trigger object to the level. More...
 
std::shared_ptr< AnnGameObjectaddGameObject (std::string entityName, std::string name="")
 Add a Game object to the level. More...
 
void addManualMovableObject (std::shared_ptr< AnnAbstractMovable > movable)
 Add a manual movable object. More...
 
template<class AbstractMovableType , class... Args>
decltype(auto) addManualMovableObject (Args &&... args)
 Construct+add a manual movable object. More...
 

Protected Attributes

AnnGameObjectList levelContent
 
AnnLightList levelLighting
 
AnnTriggerObjectList levelTrigger
 
std::vector< std::shared_ptr< AnnAbstractMovable > > levelMovable
 List of movable on the level. More...
 
std::string name
 Name of the level. More...
 

Friends

class AnnLevelManager
 

Detailed Description

Base class for all Levels. Is abstract.

Definition at line 26 of file AnnLevel.hpp.

Constructor & Destructor Documentation

◆ AnnLevel()

AnnLevel::AnnLevel ( )

Construct the level.

Definition at line 10 of file AnnLevel.cpp.

◆ ~AnnLevel()

AnnLevel::~AnnLevel ( )
virtual

Destroy the level.

Definition at line 15 of file AnnLevel.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ addGameObject()

std::shared_ptr< AnnGameObject > AnnLevel::addGameObject ( std::string  entityName,
std::string  name = "" 
)
protected

Add a Game object to the level.

Definition at line 66 of file AnnLevel.cpp.

Here is the call graph for this function:

◆ addLightObject()

std::shared_ptr< AnnLightObject > AnnLevel::addLightObject ( std::string  id = "")
protected

Add a light object to the level.

Definition at line 59 of file AnnLevel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addManualMovableObject() [1/2]

void AnnLevel::addManualMovableObject ( std::shared_ptr< AnnAbstractMovable movable)
protected

Add a manual movable object.

Definition at line 73 of file AnnLevel.cpp.

◆ addManualMovableObject() [2/2]

template<class AbstractMovableType , class... Args>
decltype(auto) Annwvyn::AnnLevel::addManualMovableObject ( Args &&...  args)
inlineprotected

Construct+add a manual movable object.

Definition at line 82 of file AnnLevel.hpp.

◆ addTrggerObject()

std::shared_ptr< AnnTriggerObject > AnnLevel::addTrggerObject ( std::string  id = "")
protected

Add a trigger object to the level.

Definition at line 78 of file AnnLevel.cpp.

Here is the call graph for this function:

◆ getContent()

AnnGameObjectList & AnnLevel::getContent ( )

Get the list of objects.

Definition at line 85 of file AnnLevel.cpp.

◆ getLights()

AnnLightList & AnnLevel::getLights ( )

Get the list of lights.

Definition at line 90 of file AnnLevel.cpp.

◆ getTriggers()

AnnTriggerObjectList & AnnLevel::getTriggers ( )

Get the list of triggers.

Definition at line 54 of file AnnLevel.cpp.

◆ load()

virtual void Annwvyn::AnnLevel::load ( )
pure virtual

Pure virtual methods that loads the level.

Implemented in Annwvyn::AnnSplashLevel.

◆ runLogic()

virtual void Annwvyn::AnnLevel::runLogic ( )
pure virtual

Run logic code from the level.

Implemented in Annwvyn::AnnSplashLevel.

◆ unload()

void AnnLevel::unload ( )
virtual

Unload the level by destroying every objects in "levelContent" and every lights in "levelLighting".

Reimplemented in Annwvyn::AnnSplashLevel.

Definition at line 21 of file AnnLevel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ AnnLevelManager

friend class AnnLevelManager
friend

Definition at line 54 of file AnnLevel.hpp.

Member Data Documentation

◆ levelContent

AnnGameObjectList Annwvyn::AnnLevel::levelContent
protected

Definition at line 57 of file AnnLevel.hpp.

◆ levelLighting

AnnLightList Annwvyn::AnnLevel::levelLighting
protected

Definition at line 60 of file AnnLevel.hpp.

◆ levelMovable

std::vector<std::shared_ptr<AnnAbstractMovable> > Annwvyn::AnnLevel::levelMovable
protected

List of movable on the level.

Definition at line 66 of file AnnLevel.hpp.

◆ levelTrigger

AnnTriggerObjectList Annwvyn::AnnLevel::levelTrigger
protected

Definition at line 63 of file AnnLevel.hpp.

◆ name

std::string Annwvyn::AnnLevel::name
protected

Name of the level.

Definition at line 90 of file AnnLevel.hpp.


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