static IEnumerator _waitForLoad()
            {
                yield return(new WaitForSeconds(1f));

                yield return(new WaitWhile(() => SaveLoadManager.main.isLoading));

                messages.ForEach(msg => msg.timeEnd = Time.time + 1f);
                yield return(new WaitForSeconds(1.1f)); // wait for messages to dissapear

                messages.ForEach(msg => GetRectTransform(msg).sizeDelta = (Vector2)prevSize);
                messages.Clear();

                Patches.Unpatch();

                yield return(new WaitForSeconds(0.5f));

                ErrorMessage.main.offset = prevOffset;
                Component.Destroy(ErrorMessage.main.GetComponent <CorrectMsgPos>());
            }
Exemplo n.º 2
0
            static IEnumerator _waitForLoad()
            {
                yield return(new WaitForSeconds(1f));

                while (SaveLoadManager.main.isLoading)
                {
                    yield return(null);
                }

                messages.ForEach(msg => msg.timeEnd = Time.time + 1f);
                yield return(new WaitForSeconds(1.1f)); // wait for messages to dissapear

                Vector2 originalSize = ErrorMessage.main.prefabMessage.rectTransform.sizeDelta;

                messages.ForEach(msg => msg.entry.rectTransform.sizeDelta = originalSize);
                messages.Clear();

                Patches.Unpatch();

                yield return(new WaitForSeconds(0.5f));

                ErrorMessage.main.offset = prevOffset;
            }