A class that represents a coin in the game.
More...
#include <Coin.hpp>
|
| | Coin (std::array< float, 2 > position={0, 0}) |
| | Constructor for Coin class.
|
| |
|
| ~Coin () |
| | Destructor for Coin class.
|
| |
| const std::array< float, 2 > & | getPosition () const |
| | Gets the position of the coin.
|
| |
| const bool & | isCollected () const |
| | Gets the collected status of the coin.
|
| |
| void | setCollected (bool collected) |
| | Set the collected status of the coin.
|
| |
|
|
std::array< float, 2 > | _position |
| |
|
bool | _collected = false |
| |
A class that represents a coin in the game.
◆ Coin()
| Coin |
( |
std::array< float, 2 > | position = {0, 0} | ) |
|
Constructor for Coin class.
- Parameters
-
| position | The position of the coin |
◆ getPosition()
| const std::array< float, 2 > & getPosition |
( |
| ) |
const |
Gets the position of the coin.
- Returns
- The position of the coin
◆ isCollected()
| const bool & isCollected |
( |
| ) |
const |
Gets the collected status of the coin.
- Returns
- The collected status of the coin
◆ setCollected()
| void setCollected |
( |
bool | collected | ) |
|
Set the collected status of the coin.
- Parameters
-
| collected | The collected status of the coin |
The documentation for this class was generated from the following files: