29 lines
538 B
C++
29 lines
538 B
C++
#ifndef LOTOSTATEK_BEAM_H
|
|
#define LOTOSTATEK_BEAM_H
|
|
|
|
#include <SFML/Graphics.hpp>
|
|
#include "Position.h"
|
|
|
|
class Beam {
|
|
public:
|
|
Beam(float x, float y, float width, float height);
|
|
|
|
void draw(sf::RenderWindow &window);
|
|
|
|
void update();
|
|
void render(sf::RenderWindow& window);
|
|
|
|
sf::FloatRect getBounds() const;
|
|
|
|
bool isVisible() const;
|
|
void setVisible(bool visible);
|
|
|
|
|
|
private:
|
|
sf::RectangleShape beamShape;
|
|
bool visible;
|
|
sf::Texture beamTexture;
|
|
sf::Sprite beamSprite;
|
|
};
|
|
|
|
#endif // LOTOSTATEK_BEAM_H
|