Modificada la cadencia de foc sense autofire i arreglades un poc les animacions de cool_down i cooling
This commit is contained in:
@@ -60,7 +60,7 @@ void Notifier::update()
|
||||
// Si la notificación anterior está "saliendo", no hagas nada
|
||||
if (i > 0)
|
||||
{
|
||||
if (notifications_[i - 1].status == NotificationStatus::RISING)
|
||||
if (notifications_[i - 1].state == NotificationStatus::RISING)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -73,8 +73,8 @@ void Notifier::update()
|
||||
{
|
||||
if (param.notification.sound)
|
||||
{
|
||||
if (notifications_[i].status == NotificationStatus::RISING)
|
||||
{
|
||||
if (notifications_[i].state == NotificationStatus::RISING)
|
||||
{
|
||||
// Reproduce el sonido de la notificación
|
||||
JA_PlaySound(Resource::get()->getSound("notify.wav"));
|
||||
}
|
||||
@@ -82,7 +82,7 @@ void Notifier::update()
|
||||
}
|
||||
|
||||
// Comprueba los estados
|
||||
if (notifications_[i].status == NotificationStatus::RISING)
|
||||
if (notifications_[i].state == NotificationStatus::RISING)
|
||||
{
|
||||
const float step = ((float)notifications_[i].counter / notifications_[i].travel_dist);
|
||||
const int alpha = 255 * step;
|
||||
@@ -99,21 +99,21 @@ void Notifier::update()
|
||||
|
||||
if (notifications_[i].rect.y == notifications_[i].y)
|
||||
{
|
||||
notifications_[i].status = NotificationStatus::STAY;
|
||||
notifications_[i].state = NotificationStatus::STAY;
|
||||
notifications_[i].texture->setAlpha(255);
|
||||
notifications_[i].counter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
else if (notifications_[i].status == NotificationStatus::STAY)
|
||||
else if (notifications_[i].state == NotificationStatus::STAY)
|
||||
{
|
||||
if (notifications_[i].counter == wait_time_)
|
||||
{
|
||||
notifications_[i].status = NotificationStatus::VANISHING;
|
||||
notifications_[i].state = NotificationStatus::VANISHING;
|
||||
notifications_[i].counter = 0;
|
||||
}
|
||||
}
|
||||
else if (notifications_[i].status == NotificationStatus::VANISHING)
|
||||
else if (notifications_[i].state == NotificationStatus::VANISHING)
|
||||
{
|
||||
|
||||
const float step = (notifications_[i].counter / (float)notifications_[i].travel_dist);
|
||||
@@ -131,7 +131,7 @@ void Notifier::update()
|
||||
|
||||
if (notifications_[i].rect.y == notifications_[i].y - notifications_[i].travel_dist)
|
||||
{
|
||||
notifications_[i].status = NotificationStatus::FINISHED;
|
||||
notifications_[i].state = NotificationStatus::FINISHED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ void Notifier::clearFinishedNotifications()
|
||||
{
|
||||
for (int i = (int)notifications_.size() - 1; i >= 0; --i)
|
||||
{
|
||||
if (notifications_[i].status == NotificationStatus::FINISHED)
|
||||
if (notifications_[i].state == NotificationStatus::FINISHED)
|
||||
{
|
||||
notifications_.erase(notifications_.begin() + i);
|
||||
}
|
||||
@@ -302,7 +302,7 @@ void Notifier::clearNotifications()
|
||||
{
|
||||
for (auto ¬ification : notifications_)
|
||||
{
|
||||
notification.status = NotificationStatus::FINISHED;
|
||||
notification.state = NotificationStatus::FINISHED;
|
||||
}
|
||||
|
||||
clearFinishedNotifications();
|
||||
|
||||
Reference in New Issue
Block a user