Modificats els grafics del enemic nou
Afegits nous audios i veus Completat el comportament del enemic nou Ampliat el numero máxim de sons simultanis
This commit is contained in:
@@ -274,7 +274,7 @@ void Game::updateStage()
|
||||
std::vector<Path> paths = {paths_.at(2), paths_.at(3)};
|
||||
if (Stage::number == 9)
|
||||
{
|
||||
createMessage(paths, Resource::get()->getTexture("last_stage"));
|
||||
createMessage(paths, Resource::get()->getTexture("game_text_last_stage"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -301,8 +301,8 @@ void Game::updateFadeInState()
|
||||
{
|
||||
balloon_manager_->createTwoBigBalloons();
|
||||
evaluateAndSetMenace();
|
||||
createMessage({paths_.at(0), paths_.at(1)}, Resource::get()->getTexture("get_ready"));
|
||||
JA_PlaySound(Resource::get()->getSound("stage_change.wav"));
|
||||
createMessage({paths_.at(0), paths_.at(1)}, Resource::get()->getTexture("game_text_get_ready"));
|
||||
JA_PlaySound(Resource::get()->getSound("voice_get_ready.wav"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -317,7 +317,7 @@ void Game::updateGameOverState()
|
||||
{
|
||||
if (game_over_counter_ == GAME_OVER_COUNTER_)
|
||||
{
|
||||
createMessage({paths_.at(2), paths_.at(3)}, Resource::get()->getTexture("game_over"));
|
||||
createMessage({paths_.at(2), paths_.at(3)}, Resource::get()->getTexture("game_text_game_over"));
|
||||
JA_FadeOutMusic(1000);
|
||||
balloon_manager_->setSounds(true);
|
||||
}
|
||||
@@ -365,8 +365,8 @@ void Game::updateCompletedState()
|
||||
// Muestra el mensaje de felicitación y da los puntos a los jugadores
|
||||
if (game_completed_counter_ == 200)
|
||||
{
|
||||
createMessage({paths_.at(4), paths_.at(5)}, Resource::get()->getTexture("congratulations"));
|
||||
createMessage({paths_.at(6), paths_.at(7)}, Resource::get()->getTexture("1000000_points"));
|
||||
createMessage({paths_.at(4), paths_.at(5)}, Resource::get()->getTexture("game_text_congratulations"));
|
||||
createMessage({paths_.at(6), paths_.at(7)}, Resource::get()->getTexture("game_text_1000000_points"));
|
||||
|
||||
for (auto &player : players_)
|
||||
if (player->isPlaying())
|
||||
@@ -943,13 +943,14 @@ void Game::fillCanvas()
|
||||
background_->render();
|
||||
renderItems();
|
||||
renderSmartSprites();
|
||||
balloon_manager_->render();
|
||||
tabe_->render();
|
||||
balloon_manager_->render();
|
||||
renderBullets();
|
||||
renderPathSprites();
|
||||
renderPlayers();
|
||||
// dbg_print(0, 40, std::to_string(menace_current_).c_str(), 255, 0, 0);
|
||||
// dbg_print(0, 50, std::to_string(menace_threshold_).c_str(), 255, 0, 0);
|
||||
|
||||
auto sprite = std::make_unique<Sprite>(Resource::get()->getTexture("game_text_game_over"));
|
||||
sprite->render();
|
||||
|
||||
// Deja el renderizador apuntando donde estaba
|
||||
SDL_SetRenderTarget(renderer_, temp);
|
||||
@@ -1023,7 +1024,7 @@ void Game::initPaths()
|
||||
{
|
||||
// Recorrido para el texto de "Get Ready!" (0,1)
|
||||
{
|
||||
const auto &texture = Resource::get()->getTexture("get_ready");
|
||||
const auto &texture = Resource::get()->getTexture("game_text_get_ready");
|
||||
const auto w = texture->getWidth();
|
||||
const int x0 = -w;
|
||||
const int x1 = param.game.play_area.center_x - w / 2;
|
||||
@@ -1035,7 +1036,7 @@ void Game::initPaths()
|
||||
|
||||
// Recorrido para el texto de "Last Stage!" o de "X stages left" o "Game Over" (2,3)
|
||||
{
|
||||
const auto &texture = Resource::get()->getTexture("last_stage");
|
||||
const auto &texture = Resource::get()->getTexture("game_text_last_stage");
|
||||
const auto h = texture->getHeight();
|
||||
const int y0 = param.game.play_area.rect.h - h;
|
||||
const int y1 = param.game.play_area.center_y - h / 2;
|
||||
@@ -1047,7 +1048,7 @@ void Game::initPaths()
|
||||
|
||||
// Recorrido para el texto de "Congratulations!!" (3,4)
|
||||
{
|
||||
const auto &texture = Resource::get()->getTexture("congratulations");
|
||||
const auto &texture = Resource::get()->getTexture("game_text_congratulations");
|
||||
const auto w = texture->getWidth();
|
||||
const auto h = texture->getHeight();
|
||||
const int x0 = -w;
|
||||
@@ -1060,7 +1061,7 @@ void Game::initPaths()
|
||||
|
||||
// Recorrido para el texto de "1.000.000 points!" (5,6)
|
||||
{
|
||||
const auto &texture = Resource::get()->getTexture("1000000_points");
|
||||
const auto &texture = Resource::get()->getTexture("game_text_1000000_points");
|
||||
const auto w = texture->getWidth();
|
||||
const auto h = texture->getHeight();
|
||||
const int x0 = param.game.play_area.rect.w;
|
||||
@@ -1198,8 +1199,7 @@ void Game::checkEvents()
|
||||
}
|
||||
case SDLK_6: // Crea un mensaje
|
||||
{
|
||||
createMessage({paths_.at(4), paths_.at(5)}, Resource::get()->getTexture("congratulations"));
|
||||
createMessage({paths_.at(6), paths_.at(7)}, Resource::get()->getTexture("1000000_points"));
|
||||
createMessage({paths_.at(2), paths_.at(3)}, Resource::get()->getTexture("game_text_congratulations"));
|
||||
break;
|
||||
}
|
||||
case SDLK_7: // Flash
|
||||
|
||||
Reference in New Issue
Block a user