levelz-cpp 0.2.0
Loading...
Searching...
No Matches
LevelZ::Level2D Struct Reference

#include <level.hpp>

Inheritance diagram for LevelZ::Level2D:
LevelZ::Level

Public Member Functions

 Level2D ()
 
 Level2D (const std::unordered_map< std::string, std::string > &headers)
 
 Level2D (const std::unordered_map< std::string, std::string > &headers, const std::vector< LevelObject > &blocks)
 
 Level2D (const Level &level)
 
Scroll scroll ()
 
- Public Member Functions inherited from LevelZ::Level
std::unordered_map< std::string, std::string > headers () const
 
std::vector< LevelObjectblocks () const
 
bool operator== (const Level &other) const
 
bool operator!= (const Level &other) const
 

Public Attributes

Coordinate2D spawn = Coordinate2D(0, 0)
 

Additional Inherited Members

- Protected Member Functions inherited from LevelZ::Level
- Protected Attributes inherited from LevelZ::Level
std::unordered_map< std::string, std::string > _headers = {}
 
std::vector< LevelZ::LevelObject_blocks = {}
 

Detailed Description

Represents a 2D Level.

Constructor & Destructor Documentation

◆ Level2D() [1/4]

LevelZ::Level2D::Level2D ( )
inline

Constructs a new, empty 2D Level.

◆ Level2D() [2/4]

LevelZ::Level2D::Level2D ( const std::unordered_map< std::string, std::string > & headers)
inlineexplicit

Constructs a new 2D Level with the specified headers.

Parameters
headersThe headers of the level.

◆ Level2D() [3/4]

LevelZ::Level2D::Level2D ( const std::unordered_map< std::string, std::string > & headers,
const std::vector< LevelObject > & blocks )
inline

Constructs a new 2D Level with the specified headers and blocks.

Parameters
headersThe headers of the level.
blocksThe blocks of the level.

◆ Level2D() [4/4]

LevelZ::Level2D::Level2D ( const Level & level)
inlineexplicit

Clones a 2D Level from an Abstract Level.

Parameters
levelThe level to clone.

Member Function Documentation

◆ scroll()

Scroll LevelZ::Level2D::scroll ( )
inline

Gets the scroll direction of the level.

Returns
Scroll Direction

Member Data Documentation

◆ spawn

Coordinate2D LevelZ::Level2D::spawn = Coordinate2D(0, 0)

The spawnpoint of the level.


The documentation for this struct was generated from the following file: