35 Trap(std::array<float, 2> position,
36 sf::Sprite &sprite, sf::Sound &sound,
37 Player::PlayerState player_state = Player::PlayerState::NORMAL);
71 std::array<float, 2> _position;
74 Player::PlayerState _player_state;
A class that represents a zapper in the game.
Definition Trap.hpp:24
Trap(std::array< float, 2 > position, sf::Sprite &sprite, sf::Sound &sound, Player::PlayerState player_state=Player::PlayerState::NORMAL)
Constructor for Trap class.
Definition Trap.cpp:23
sf::Sprite & getSprite()
Gets the sprite of the Trap.
Definition Trap.cpp:53
~Trap()
Destructor for Trap class.
Definition Trap.cpp:35
sf::Sound & getSound()
Gets the sound of the Trap.
Definition Trap.cpp:62
const std::array< float, 2 > & getPosition() const
Gets the position of the Trap.
Definition Trap.cpp:44
const Player::PlayerState & getPlayerState() const
Gets the state of the player after being hit by the Trap.
Definition Trap.cpp:71