This commit is contained in:
2024-01-30 15:45:14 +01:00
parent d67394aaec
commit ca204d05af
17 changed files with 658 additions and 568 deletions
+12 -12
View File
@@ -1,13 +1,13 @@
#include "Shield.h"
Shield::Shield(Window& window) {
int shapeWidth = window.getSize().x / 10;
int shapeHeight = window.getSize().y / 35;
_shape = RectangleShape(Vector2f(shapeWidth, shapeHeight));
_shape.setFillColor(Color(Color(52, 252, 5)));
}
void Shield::setPosition(Vector2f position) {
_shape.setPosition(position.x + _shape.getSize().x, position.y - _shape.getScale().y);
#include "Shield.h"
Shield::Shield(Window& window) {
int shapeWidth = window.getSize().x / 10;
int shapeHeight = window.getSize().y / 35;
_shape = RectangleShape(Vector2f(shapeWidth, shapeHeight));
_shape.setFillColor(Color(Color(52, 252, 5)));
}
void Shield::setPosition(Vector2f position) {
_shape.setPosition(position.x + _shape.getSize().x, position.y - _shape.getScale().y);
}