powerups fully implemented

This commit is contained in:
2025-01-06 16:17:38 +01:00
parent b1b5858fb6
commit 4d2283d15e
9 changed files with 87 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
#include "../headers/PowerUp.h"
PowerUp::PowerUp(float x, float y, sf::Texture &texture): ObjectItem(x, y, texture) {
PowerUp::PowerUp(float x, float y, sf::Texture &texture, PowerUp::Type type): ObjectItem(x, y, texture) {
position.x = x;
position.y = y;
texture_ = texture;
@@ -9,6 +9,7 @@ PowerUp::PowerUp(float x, float y, sf::Texture &texture): ObjectItem(x, y, textu
sprite.setScale(0.5f, 0.5f);
sprite.setPosition(x, y);
movingSpeed = 3.0f;
this->type_ = type;
}
void PowerUp::update() {