Naprawiono białe kwadraty i zmieniono tło
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include <iostream>
|
||||
#include "../headers/Bullet.h"
|
||||
|
||||
Bullet::Bullet(float x, float y) {
|
||||
Bullet::Bullet(float x, float y, sf::Texture &bulletTexture) {
|
||||
outOfBounds = false;
|
||||
bulletTexture.loadFromFile("../assets/img/bullet.png");
|
||||
// bulletTexture.loadFromFile("../assets/img/bullet.png");
|
||||
bulletSprite.setTexture(bulletTexture);
|
||||
bulletSprite.setPosition(x, y);
|
||||
bulletSpeed = -10.0f;
|
||||
@@ -24,6 +24,6 @@ void Bullet::update() {
|
||||
bulletPosition.y += bulletSpeed;
|
||||
if(bulletPosition.y < -100) {
|
||||
outOfBounds = true;
|
||||
std::cout << "Bullet out of bounds\n";
|
||||
// std::cout << "Bullet out of bounds\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user