示例#1
0
        protected virtual void start_chapter_worldmap_event()
        {
            Phase = Worldmap_Phases.Worldmap_Event;
            var worldmapEvent = GetWorldmapEvent();

            if (worldmapEvent == null)
            {
                Phase      = Worldmap_Phases.Fade_Out;
                Fade_Timer = Constants.WorldMap.WORLDMAP_FADE_TIME;
                Global.Audio.BgmFadeOut(Constants.WorldMap.WORLDMAP_FADE_TIME);
            }
            else
            {
                Global.game_system.add_event(worldmapEvent);
            }
        }
示例#2
0
        protected void select_chapter_fade()
        {
            Phase      = Worldmap_Phases.Controls_Fade;
            Fade_Timer = MenuData.AutoSelectChapter ?
                         1 : Constants.WorldMap.WORLDMAP_CONTROLS_FADE_TIME;
            if (IsBlockedHardMode(MenuData.ChapterId))
            {
                Hard_Mode_Blocked_Window = new Parchment_Info_Window();
                Hard_Mode_Blocked_Window.set_text(@"This chapter does not yet have
hard mode data, and will be
loaded in normal mode. Sorry!");
                Hard_Mode_Blocked_Window.size = new Vector2(160, 64);
                Hard_Mode_Blocked_Window.loc  = new Vector2(Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT) / 2 - Hard_Mode_Blocked_Window.size / 2;

                Global.game_system.Difficulty_Mode = Difficulty_Modes.Normal;
            }
        }
示例#3
0
 public void WorldmapExit()
 {
     Phase      = Worldmap_Phases.Return_To_Title;
     Fade_Timer = Constants.WorldMap.WORLDMAP_FADE_TIME;
     Global.Audio.BgmFadeOut(Constants.WorldMap.WORLDMAP_FADE_TIME);
 }
示例#4
0
        private void update_worldmap_command()
        {
            switch (Phase)
            {
            case Worldmap_Phases.Fade_In:
                switch (Timer)
                {
                default:
                    // If autoselecting a chapter with no world map event
                    if (MenuData.AutoSelectChapter && GetWorldmapEvent() == null)
                    {
                        // If hard mode is blocked, nevermind
                        if (!IsBlockedHardMode(MenuData.ChapterId))
                        {
                            MenuManager = null;
                            start_chapter();
                            break;
                        }
                    }

                    if (Fade_Timer > 0)
                    {
                        Fade_Timer--;
                    }
                    if (Fade_Timer == Constants.WorldMap.WORLDMAP_FADE_TIME / 4)
                    {
                        if (!MenuData.AutoSelectChapter)
                        {
                            Global.Audio.PlayBgm(Constants.WorldMap.WORLDMAP_THEME);
                        }
                    }
                    if (Fade_Timer == 0)
                    {
                        Phase = Worldmap_Phases.Command_Process;
                    }
                    break;
                }
                break;

            case Worldmap_Phases.Command_Process:
                if (MenuData.AutoSelectChapter)
                {
                    select_chapter_fade();
                }
                break;

            case Worldmap_Phases.Controls_Fade:
                if (Hard_Mode_Blocked_Window != null)
                {
                    Hard_Mode_Blocked_Window.update();
                    if (Hard_Mode_Blocked_Window.is_ready)
                    {
                        if (Hard_Mode_Blocked_Window.selected_index().IsSomething)
                        {
                            Global.game_system.play_se(System_Sounds.Confirm);
                            Hard_Mode_Blocked_Window = null;
                        }
                    }
                }
                else
                {
                    if (Fade_Timer > 0)
                    {
                        Fade_Timer--;
                        MenuOffset += new Vector2(-1, 0);
                    }
                    if (Fade_Timer == 0 && !scrolling)
                    {
                        MenuManager = null;
                        start_chapter_worldmap_event();
                    }
                }
                break;

            case Worldmap_Phases.Worldmap_Event:
                if (!Global.game_system.is_interpreter_running)
                {
                    Phase      = Worldmap_Phases.Fade_Out;
                    Fade_Timer = Constants.WorldMap.WORLDMAP_FADE_TIME;
                    Global.Audio.BgmFadeOut(Constants.WorldMap.WORLDMAP_FADE_TIME);
                }
                break;

            case Worldmap_Phases.Fade_Out:
                if (Fade_Timer > 0)
                {
                    Fade_Timer--;
                }
                if (Fade_Timer == 0)
                {
                    start_chapter();
                }
                break;

            case Worldmap_Phases.Return_To_Title:
                if (Fade_Timer > 0)
                {
                    Fade_Timer--;
                }
                if (Fade_Timer == 0)
                {
                    Global.scene_change("Scene_Title_Load");
                    MenuManager = null;
                }
                break;
            }
        }