Пример #1
0
        public ScenePreBattle(string script_path, string next_battle_setup_script_path)
        {
            this.next_battle_setup_script_path = next_battle_setup_script_path;
            var game_main = GameMain.GetInstance();

            game_main.g3d_map    = new BattleMap(game_main.game_base);
            game_main.g3d_camera = new G3DCamera();

            int[] map_data = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };

            game_main.g3d_map.map_w = 5;
            game_main.g3d_map.map_h = 3;
            game_main.g3d_map.Setup(map_data);

            setup_script = new Script("data/script/pre_battle.nst", _ScriptLineAnalyze);
            setup_script.Run("Setup");

            game_main.g3d_camera.SetDirectPosAndRot(DX.VGet(-8.257049f, 0f, 63.04372f), DX.VGet(0.6088442f, 0f, 0.793291f));
            game_main.g3d_camera._NotToFixHard();

            font_unit_list   = new SFont(GameMain.main_font_name_r, 22, 0, SFont.Antialiasing.Normal, 0);
            font_side_button = new SFont(GameMain.main_font_name_b, 22, 0, SFont.Antialiasing.Normal, 0);

            game_main.g3d_map.is_draw_cursor_turn_owner = true;

            // ユニット一覧をボタンとして作成
            var ox = GameMain.WindowSizeW - (240 + 16);
            var oy = 30 + 16 * 2;
            var w  = 240;
            var h  = 30;
            var i  = 0;

            foreach (var ums in game_main.unit_manager.units)
            {
                var box = new UIBoxString(ox, oy + h * i, w, h, ums.unit.name, font_unit_list);
                ui_unit_names.Add(box);
                i++;
            }

            //
            {
                UIBoxString box;
                box = new UIBoxString(GameMain.WindowSizeW - (80 + 16), 16, 80, h, "完了", font_side_button);
                ui_side_button.Add(box);
                box = new UIBoxString(GameMain.WindowSizeW - (80 + 16 + 140), 16, 130, h, "ステータス", font_side_button);
                ui_side_button.Add(box);
            }
        }
Пример #2
0
        public SceneEndBattle(string mode_name, string script_path)
        {
            font           = new SFont(GameMain.main_font_name_b, 80, 0, SFont.Antialiasing.Normal, 4);
            this.mode_name = mode_name;

            var game_main = GameMain.GetInstance();

            game_main.user_interface.SetStatusUnit(null);
            game_main.g3d_map.is_draw_cursor_turn_owner = false;

            var font_ui = new SFont(GameMain.main_font_name_r, 22, 0, SFont.Antialiasing.Normal, 0);

            ui_box_restart = new UIBoxString(GameMain.WindowSizeW / 2, GameMain.WindowSizeH / 2 + 80, 200, 32, "Restart", font_ui);
            ui_box_restart.SetCenter(true, true);

            switch (mode_name)
            {
            case "Game Over":
                mode_title = "Game Over";
                edge_color = DX.GetColor(255, 0, 0);


                break;

            case "Stage Clear":
                mode_title = "Stage Clear";
                edge_color = DX.GetColor(0, 0, 255);

                break;

            default:
                mode_title = mode_name;
                edge_color = DX.GetColor(0, 0, 255);
                break;
            }
        }