Esempio n. 1
0
        public bool _ScriptLineAnalyze(Script.ScriptLineToken t)
        {
            var game_main = GameMain.GetInstance();
            //var user_interface = game_main.user_interface;
            //var game_base = game_main.game_base;
            //var g3d_camera = game_main.g3d_camera;
            var g3d_map      = game_main.g3d_map;
            var unit_manager = game_main.unit_manager;

            //var action_manager = game_main.action_manager;

            //switch (t.command[0])
            //{
            //    //case "MapData":
            //    //    {
            //    //        var size = t.command.Count();
            //    //        for (var i = 1; i < size; i++)
            //    //        {
            //    //            setup_script_data.map_data.Add(t.GetInt(i));
            //    //        }
            //    //        setup_script_data.map_w = size - 1;
            //    //    }
            //    //    break;
            //}
            return(false);
        }
Esempio n. 2
0
        public bool _ScriptLineAnalyze(Script.ScriptLineToken t)
        {
            switch (t.command[0])
            {
            case "$":
                switch (t.command[1])
                {
                case "SystemName":  system_name = t.GetString(2); break;

                case "ViewName":    view_name = t.GetString(2); break;

                case "Type":        type = t.GetString(2); break;

                case "Range":
                    range_min     = t.GetInt(2);
                    range_max     = t.GetInt(3);
                    range_type    = t.GetString(4);
                    range_ok_type = t.GetString(5);
                    break;

                case "EffectValue":
                    effect_src_main             = t.GetString(2);
                    effect_src_main_correction  = t.GetInt(3);
                    effect_src_direct           = t.GetInt(4);
                    effect_src_random           = t.GetInt(5);
                    effect_src_range_correction = t.GetInt(6);
                    effect_dst_main             = t.GetString(7);
                    effect_dst_main_correction  = t.GetInt(8);
                    break;
                }
                break;
            }

            return(false);
        }
Esempio n. 3
0
        bool _ScriptLineAnalyze(Script.ScriptLineToken t)
        {
            switch (t.command[0])
            {
            case "$":
            {
                switch (t.command[1])
                {
                case "ClassName":
                    class_name = t.GetString(2);
                    return(true);

                case "DefaultImage":
                    image_default_path = t.GetString(2);
                    return(true);

                case "DefaultModel":
                    model_default_path = t.GetString(2);
                    return(true);

                case "Action":
                {
                    var a = new ActionStatus(t.GetString(2), t.GetInt(3));
                    actions.Add(a);
                }
                    return(true);

                case "ExpBonus":
                    exp_bonus = t.GetInt(2);
                    return(true);

                default:
                {
                    var cs = new ClassStatus(t.GetString(1), t.GetInt(2), t.GetInt(3));
                    status.Add(t.command[1], cs);
                }
                    return(true);
                }
            }
            }
            return(false);
        }
Esempio n. 4
0
        public bool _ScriptLineAnalyze(Script.ScriptLineToken t)
        {
            switch (t.command[0])
            {
            case "SetColorChange":
            {
                var color_no       = t.GetInt(1);
                var material_index = t.GetInt(2);
                var texture_path   = t.GetString(3);
                model.AddChangeTextureData(color_no, material_index, texture_path);
            }
                return(true);

            case "ConectMotion":
            {
                var key = t.GetString(1);
                var no  = t.GetInt(2);
                model.AddConectMotionData(key, no);
            }
                return(true);
            }
            return(false);
        }
Esempio n. 5
0
        public bool _ScriptLineAnalyze(Script.ScriptLineToken t)
        {
            var game_main = GameMain.GetInstance();
            //var user_interface = game_main.user_interface;
            //var game_base = game_main.game_base;
            //var g3d_camera = game_main.g3d_camera;
            var g3d_map      = game_main.g3d_map;
            var unit_manager = game_main.unit_manager;

            //var action_manager = game_main.action_manager;

            switch (t.command[0])
            {
            case "SetupScene":
                switch (t.command[1])
                {
                case "Battle":
                {
                    var script_path = t.GetString(2);
                    var scene       = new SceneBattle(script_path, false);
                    game_main.NextScene(scene);
                }
                    return(true);

                case "PreBattle":
                {
                    var script_path_pre  = t.GetString(2);
                    var script_path_main = t.GetString(3);
                    var scene            = new ScenePreBattle(script_path_pre, script_path_main);
                    game_main.NextScene(scene);
                }
                    return(true);

                case "CreateMap":
                {
                    //var script_path_pre = t.GetString(2);
                    //var script_path_main = t.GetString(3);
                    var scene = new SceneCreateMap();
                    game_main.NextScene(scene);
                }
                    return(true);
                }
                break;

            case "ConectSound":
            {
                var key_name = t.GetString(1);
                var path     = t.GetString(2);
                SoundManager.ConectSound(key_name, path);
            }
                return(true);

            case "ConectOnePointModel":
            {
                var key_name = t.GetString(1);
                var path     = t.GetString(2);
                ModelManager.ConectOnePointModel(key_name, path);
            }
                return(true);

            case "SetupActionData":
            {
                var path = t.GetString(1);
                ActionDataManager.SetupActionData(path);
            }
                return(true);

            case "SetupClassData":
            {
                var path = t.GetString(1);
                UnitDataManager.AddClassData(path);
            }
                return(true);

            case "DebugMode":
                switch (t.GetString(1))
                {
                case "UI":
                    game_main.debug_status.is_battle_ui_debug_mode = true;
                    return(true);

                case "Auto":
                    game_main.debug_status.is_auto_battle = true;
                    game_main.user_interface.SetMode(UserInterface.Mode.NonePlayerTurn, game_main.game_base.input.mouse_sutatus.position);
                    return(true);
                }
                return(true);
            }
            return(false);
        }
Esempio n. 6
0
        public bool _ScriptLineAnalyze(Script.ScriptLineToken t)
        {
            var game_main      = GameMain.GetInstance();
            var user_interface = game_main.user_interface;
            var game_base      = game_main.game_base;
            //var g3d_camera = game_main.g3d_camera;
            var g3d_map      = game_main.g3d_map;
            var unit_manager = game_main.unit_manager;

            //var action_manager = game_main.action_manager;

            switch (t.command[0])
            {
            case "MapLoad":
            {
                var map_path = t.GetString(1);
                g3d_map.Load(map_path);
            }
                return(true);

            case "MapData":
            {
                var size = t.command.Count();
                for (var i = 1; i < size; i++)
                {
                    setup_script_data.map_data.Add(t.GetInt(i));
                }
                setup_script_data.map_w = size - 1;
            }
                return(true);

            case "MapSetup":
            {
                setup_script_data.map_h = setup_script_data.map_data.Count() / setup_script_data.map_w;
                g3d_map.map_w           = setup_script_data.map_w;
                g3d_map.map_h           = setup_script_data.map_h;

                g3d_map.Setup(setup_script_data.map_data.ToArray());
            }
                return(true);

            case "Unit":
            {
                var x = t.GetInt(1);
                var y = t.GetInt(2);
                var unit_class_name = t.GetString(3);
                var ucd             = UnitDataManager.GetUnitClassData(unit_class_name);
                var model_path      = t.GetString(4);
                var image_face_path = t.GetString(5);

                var name      = t.GetString(6);
                var group     = t.GetString(7);
                var color_no  = t.GetInt(8);
                var direction = t.GetInt(9);

                if (!(is_continue_player_unit && group == "味方"))
                {
                    var unit = new Unit(unit_class_name, model_path, image_face_path, name, x, y, color_no, direction);
                    unit_manager.Join(unit, group);
                }
            }
                //unit_manager.Join(new Unit(path, 3, 5, 1, 0), "敵");
                return(true);
            }
            return(false);
        }
Esempio n. 7
0
        public bool _ScriptLineAnalyze(Script.ScriptLineToken t)
        {
            var game_main = GameMain.GetInstance();
            //var user_interface = game_main.user_interface;
            //var game_base = game_main.game_base;
            //var g3d_camera = game_main.g3d_camera;
            var g3d_map      = game_main.g3d_map;
            var unit_manager = game_main.unit_manager;

            //var action_manager = game_main.action_manager;

            switch (t.command[0])
            {
            //case "MapData":
            //    {
            //        var size = t.command.Count();
            //        for (var i = 1; i < size; i++)
            //        {
            //            setup_script_data.map_data.Add(t.GetInt(i));
            //        }
            //        setup_script_data.map_w = size - 1;
            //    }
            //    break;
            //case "MapSetup":
            //    {
            //        setup_script_data.map_h = setup_script_data.map_data.Count() / setup_script_data.map_w;
            //        g3d_map.map_w = setup_script_data.map_w;
            //        g3d_map.map_h = setup_script_data.map_h;

            //        g3d_map.Setup(setup_script_data.map_data.ToArray());

            //    }
            //    break;
            case "Unit":
            {
                var x = t.GetInt(1);
                var y = t.GetInt(2);
                var unit_class_name = t.GetString(3);
                var ucd             = UnitDataManager.GetUnitClassData(unit_class_name);
                var model_path      = "data/model/" + t.GetString(4) + "/_.pmd";
                var image_face_path = "data/image/face/" + t.GetString(5);

                // 下記のifはUnitのコンストラクタで処理しても良い?
                if (t.GetString(4) == "")
                {
                    model_path = ucd.model_default_path;
                }
                if (t.GetString(5) == "")
                {
                    image_face_path = ucd.image_default_path;
                }

                var name      = t.GetString(6);
                var group     = t.GetString(7);
                var color_no  = t.GetInt(8);
                var direction = t.GetInt(9);
                var unit      = new Unit(unit_class_name, model_path, image_face_path, name, x, y, color_no, direction);
                unit_manager.Join(unit, group);
            }
                //unit_manager.Join(new Unit(path, 3, 5, 1, 0), "敵");
                break;
                //case "DebugMode":
                //    if (t.GetString(1) == "True")
                //    {
                //        is_debug_mode = true;
                //    }
                //    else
                //    {
                //        is_debug_mode = false;
                //    }
                //    break;
            }
            return(false);
        }