Beispiel #1
0
        public static IEnumerator LoadAsync()
        {
            WaitScreen.Item item = WaitScreen.Add("Loading Multiplayer", null);
            WaitScreen.ShowImmediately();
            Main.StartSession();
            yield return(new WaitUntil(() => Main.InitialSyncCompleted));

            WaitScreen.Remove(item);
            SetLoadingComplete();
        }
Beispiel #2
0
        public static IEnumerator LoadAsync()
        {
            WaitScreen.Item item = WaitScreen.Add("Loading Multiplayer", null);
            WaitScreen.ShowImmediately();
            Main.StartSession();
            yield return(new WaitUntil(() => Main.InitialSyncCompleted == true));

            PropertyInfo property = PAXTerrainController.main.GetType().GetProperty("isWorking");

            property.SetValue(PAXTerrainController.main, false, null);
            WaitScreen.Remove(item);
        }
        private static IEnumerator LoadMusic(bool force = false)
        {
            if (Config.IncludeOST)
            {
                LoadOST();
            }
            LoadCustomMusic();

            var failed = failedPaths.Count();

            yield return(new WaitWhile(() => WaitScreen.main == null));

            if (OSTPreload == null && OST.Any(x => x.Value == null))
            {
                OSTPreload = CoroutineHost.StartCoroutine(PreloadOST());
            }
            if (CustomMusicPreload == null && CustomMusic.Any(x => x.Value == null))
            {
                CustomMusicPreload = CoroutineHost.StartCoroutine(PreloadCustomMusic());
            }

            if ((OSTPreload != null || CustomMusicPreload != null) && force)
            {
                FreezeTime.Begin("CustomTunesPreload");
                WaitScreen.ShowImmediately();
            }

            yield return(OSTPreload);

            yield return(CustomMusicPreload);

            GeneratePlaylist();

            yield return(new WaitWhile(() => WaitScreen.main.isShown));

            FreezeTime.End("CustomTunesPreload");

            if (failedPaths.Count() > failed)
            {
                ErrorMessage.AddError("Some tracks failed to load, see error log for details.");
            }
        }
Beispiel #4
0
        public static IEnumerator LoadAsync()
        {
            WaitScreen.ManualWaitItem worldSettleItem = WaitScreen.Add(Language.main.Get("Nitrox_WorldSettling"));
            WaitScreen.ShowImmediately();

            yield return(new WaitUntil(() => LargeWorldStreamer.main != null &&
                                       LargeWorldStreamer.main.land != null &&
                                       LargeWorldStreamer.main.IsReady() &&
                                       LargeWorldStreamer.main.IsWorldSettled()));

            WaitScreen.Remove(worldSettleItem);

            WaitScreen.ManualWaitItem item = WaitScreen.Add(Language.main.Get("Nitrox_JoiningSession"));
            yield return(Main.StartCoroutine(Main.StartSession()));

            WaitScreen.Remove(item);

            yield return(new WaitUntil(() => Main.InitialSyncCompleted));

            SetLoadingComplete();
        }