Ejemplo n.º 1
0
        private IEnumerator EnterFirstAreaRoutine()
        {
            // Replace ID 0 with SaveData.Instance.LastArea.ID

            Overworld overworld = fileSelect.Overworld;
            AreaData  area      = AreaData.Areas[SaveData.Instance.LastArea.ID];

            if (area.GetLevelSet() != "Celeste")
            {
                // Pretend that we've beaten Prologue.
                LevelSetStats stats = SaveData.Instance.GetLevelSetStatsFor("Celeste");
                stats.UnlockedAreas = 1;
                stats.AreasIncludingCeleste[0].Modes[0].Completed = true;
            }

            yield return(fileSelect.Leave(null));

            yield return(overworld.Mountain.EaseCamera(0, area.MountainIdle));

            yield return(0.3f);

            overworld.Mountain.EaseCamera(0, area.MountainZoom, 1f);
            yield return(0.4f);

            area.Wipe(overworld, false, null);
            overworld.RendererList.UpdateLists();
            overworld.RendererList.MoveToFront(overworld.Snow);

            yield return(0.5f);

            LevelEnter.Go(new Session(SaveData.Instance.LastArea), false);
        }
Ejemplo n.º 2
0
        private IEnumerator StartRoutine(AreaData area, AreaMode mode = AreaMode.Normal, string checkpoint = null)
        {
            Overworld.Maddy.Hide(false);
            area.Wipe(Overworld, false, null);
            Audio.SetMusic(null, true, true);
            Audio.SetAmbience(null, true);
            if ((area.ID == 0 || area.ID == 9) && checkpoint == null && mode == AreaMode.Normal)
            {
                Overworld.RendererList.UpdateLists();
                Overworld.RendererList.MoveToFront(Overworld.Snow);
            }
            yield return(0.5f);

            LevelEnter.Go(new Session(area.ToKey(mode), checkpoint), false);
        }