Dodano wiecej progow %
This commit is contained in:
BIN
assets/img/ultimate/ultimate_10.png
Normal file
BIN
assets/img/ultimate/ultimate_10.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
assets/img/ultimate/ultimate_30.png
Normal file
BIN
assets/img/ultimate/ultimate_30.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
BIN
assets/img/ultimate/ultimate_50.png
Normal file
BIN
assets/img/ultimate/ultimate_50.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
BIN
assets/img/ultimate/ultimate_70.png
Normal file
BIN
assets/img/ultimate/ultimate_70.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
BIN
assets/img/ultimate/ultimate_90.png
Normal file
BIN
assets/img/ultimate/ultimate_90.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
@@ -120,7 +120,7 @@ private:
|
|||||||
sf::Texture movingSpeedDebuffTexture;
|
sf::Texture movingSpeedDebuffTexture;
|
||||||
sf::Texture firerateDebuffTexture;
|
sf::Texture firerateDebuffTexture;
|
||||||
sf::Texture bulletSpeedDebuffTexture;
|
sf::Texture bulletSpeedDebuffTexture;
|
||||||
sf::Texture ultimateIndicatorTextures[6];
|
sf::Texture ultimateIndicatorTextures[11];
|
||||||
|
|
||||||
// Tablice
|
// Tablice
|
||||||
std::vector<Enemy> enemies;
|
std::vector<Enemy> enemies;
|
||||||
|
|||||||
@@ -80,26 +80,32 @@ Plansza::Plansza(unsigned int windowHeight, unsigned int windowWidth, sf::Render
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Plansza::loadUltimateIndicators() {
|
void Plansza::loadUltimateIndicators() {
|
||||||
const std::string texturePaths[6] = {
|
const std::string texturePaths[11] = {
|
||||||
"../assets/img/ultimate/ultimate_0.png",
|
"../assets/img/ultimate/ultimate_0.png",
|
||||||
|
"../assets/img/ultimate/ultimate_10.png",
|
||||||
"../assets/img/ultimate/ultimate_20.png",
|
"../assets/img/ultimate/ultimate_20.png",
|
||||||
|
"../assets/img/ultimate/ultimate_30.png",
|
||||||
"../assets/img/ultimate/ultimate_40.png",
|
"../assets/img/ultimate/ultimate_40.png",
|
||||||
|
"../assets/img/ultimate/ultimate_50.png",
|
||||||
"../assets/img/ultimate/ultimate_60.png",
|
"../assets/img/ultimate/ultimate_60.png",
|
||||||
|
"../assets/img/ultimate/ultimate_70.png",
|
||||||
"../assets/img/ultimate/ultimate_80.png",
|
"../assets/img/ultimate/ultimate_80.png",
|
||||||
|
"../assets/img/ultimate/ultimate_90.png",
|
||||||
"../assets/img/ultimate/ultimate_100.png"
|
"../assets/img/ultimate/ultimate_100.png"
|
||||||
};
|
};
|
||||||
|
|
||||||
for (int i = 0; i < 6; ++i) {
|
for (int i = 0; i < 11; ++i) {
|
||||||
if (!ultimateIndicatorTextures[i].loadFromFile(texturePaths[i])) {
|
if (!ultimateIndicatorTextures[i].loadFromFile(texturePaths[i])) {
|
||||||
std::cerr << "Failed to load ultimate indicator texture: " << texturePaths[i] << std::endl;
|
std::cerr << "Failed to load ultimate indicator texture: " << texturePaths[i] << std::endl;
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
sf::Sprite sprite;
|
sf::Sprite sprite;
|
||||||
sprite.setTexture(ultimateIndicatorTextures[i]);
|
sprite.setTexture(ultimateIndicatorTextures[i]);
|
||||||
sprite.setPosition(10, window->getSize().y - 60); // Lewy dolny róg
|
sprite.setPosition(10, window->getSize().y - 60);
|
||||||
sprite.setScale(0.7f, 0.7f); // Skalowanie
|
sprite.setScale(0.5f, 0.5f);
|
||||||
ultimateIndicators.push_back(sprite);
|
ultimateIndicators.push_back(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Refactor tej metody bo rozrosła się za bardzo już
|
// TODO: Refactor tej metody bo rozrosła się za bardzo już
|
||||||
@@ -136,8 +142,8 @@ void Plansza::update() {
|
|||||||
ship->ultimate_shoot();
|
ship->ultimate_shoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
int indicatorIndex = ultimateCounter / 40;
|
int indicatorIndex = ultimateCounter / 20;
|
||||||
indicatorIndex = std::min(indicatorIndex, 5); // Zapobiegaj przekroczeniu zakresu
|
indicatorIndex = std::min(indicatorIndex, 10); // Zapobiegaj przekroczeniu zakresu
|
||||||
window->draw(ultimateIndicators[indicatorIndex]);
|
window->draw(ultimateIndicators[indicatorIndex]);
|
||||||
|
|
||||||
// TODO: Przenieść obiekt dźwięku wewnątrz klasy Bullet
|
// TODO: Przenieść obiekt dźwięku wewnątrz klasy Bullet
|
||||||
|
|||||||
Reference in New Issue
Block a user