feat(shield): added shields

This commit is contained in:
2024-01-23 11:40:46 +01:00
parent 15c745d7c0
commit d67394aaec
10 changed files with 127 additions and 10 deletions
+26
View File
@@ -0,0 +1,26 @@
#pragma once
#include <iostream>
#include <string>
#include <SFML/Graphics.hpp>
using namespace sf;
using namespace std;
class Shield
{
public:
Shield() {};
Shield(Window& window);
void setPosition(Vector2f position);
RectangleShape& getShape() { return _shape; };
int getLife() const { return _life; };
void decreaseLife() { _life -= 1; };
private:
int _life = 10;
RectangleShape _shape;
};