A class that represents a zapper in the game.
More...
#include <Trap.hpp>
|
| | Trap (std::array< float, 2 > position, sf::Sprite &sprite, sf::Sound &sound, Player::PlayerState player_state=Player::PlayerState::NORMAL) |
| | Constructor for Trap class.
|
| |
|
| ~Trap () |
| | Destructor for Trap class.
|
| |
| const std::array< float, 2 > & | getPosition () const |
| | Gets the position of the Trap.
|
| |
| sf::Sprite & | getSprite () |
| | Gets the sprite of the Trap.
|
| |
| sf::Sound & | getSound () |
| | Gets the sound of the Trap.
|
| |
| const Player::PlayerState & | getPlayerState () const |
| | Gets the state of the player after being hit by the Trap.
|
| |
|
|
std::array< float, 2 > | _position |
| |
|
sf::Sprite & | _sprite |
| |
|
sf::Sound & | _sound |
| |
|
Player::PlayerState | _player_state |
| |
A class that represents a zapper in the game.
◆ Trap()
| Trap |
( |
std::array< float, 2 > | position, |
|
|
sf::Sprite & | sprite, |
|
|
sf::Sound & | sound, |
|
|
Player::PlayerState | player_state = Player::PlayerState::NORMAL ) |
Constructor for Trap class.
- Parameters
-
| position | The position of the Trap |
| sprite | The sprite of the Trap |
| sound | The sound of the Trap |
| player_state | The state of the player after being hit by the Trap |
◆ getPlayerState()
| const Player::PlayerState & getPlayerState |
( |
| ) |
const |
Gets the state of the player after being hit by the Trap.
- Returns
- The state of the player after being hit by the Trap
◆ getPosition()
| const std::array< float, 2 > & getPosition |
( |
| ) |
const |
Gets the position of the Trap.
- Returns
- The position of the Trap
◆ getSound()
Gets the sound of the Trap.
- Returns
- The sound of the Trap
◆ getSprite()
| sf::Sprite & getSprite |
( |
| ) |
|
Gets the sprite of the Trap.
- Returns
- The sprite of the Trap
The documentation for this class was generated from the following files: