fixed bug with scene reset, do an early condition check for the UX manager that will bypass fading on or off any condition that is already met

This commit is contained in:
Dan 2020-12-07 20:10:06 -08:00
Родитель 9a9b718d00
Коммит 4f5f889d50
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -223,10 +223,16 @@ public class UIManager : MonoBehaviour
{
// pop off
m_CurrentHandle = m_UXOrderedQueue.Dequeue();
// exit instantly, if the goal is already met it will skip showing the first UI and move to the next in the queue
m_GoalReached = GetGoal(m_CurrentHandle.Goal);
if (m_GoalReached.Invoke())
{
return;
}
// fade on
FadeOnInstructionalUI(m_CurrentHandle.InstructionalUI);
m_GoalReached = GetGoal(m_CurrentHandle.Goal);
m_ProcessingInstructions = true;
m_FadedOff = false;
}