예제 #1
0
 public ActionData(string script_path)
 {
     if (script_path.IndexOf(".py") >= 0)
     {
         this.script_path = script_path;
         python_script    = new PythonScript(script_path);
         //python_script.SetVariable("action_data", );
         python_script.script.Setup(this);
     }
     else
     {
         script = new Script(script_path, _ScriptLineAnalyze);
         script.Run("Setup");
     }
 }
예제 #2
0
        bool is_battle_end_check = true; // 戦闘中 → 勝利・敗北の判定を行うかどうか


        //S3DPanel s3dpanel = new S3DPanel(new S3DPoint(5, 5, 5), new SDPoint(10, 10), S3DPanel.Direction.Wall_EW);
        //S3DCube s3dcube = new S3DCube(new S3DPoint(15, 7.5, 15), new S3DPoint(10, 15, 5));

        /// <summary>
        ///
        /// </summary>
        /// <param name="is_continue_player_unit">プレーヤーユニットを引き継ぐかどうか trueならスクリプトから味方を生成しない</param>
        public SceneBattle(string script_path, bool is_continue_player_unit)
        {
            this.is_continue_player_unit = is_continue_player_unit;

            var game_main = GameMain.GetInstance();

            game_main.g3d_map    = new BattleMap(game_main.game_base);
            game_main.g3d_camera = new G3DCamera();
            setup_script         = new Script(script_path, _ScriptLineAnalyze);
            //setup_script.Run("Setup");
            python_script = new PythonScript(@"data/script/stage_0.py");
            python_script.SetVariable("Map", new ScriptConector.BattleMapScriptConector(new ScriptManager(@"data/script/stage_0.py"), is_continue_player_unit));
            python_script.script.Setup();

            // 戦闘初期化
            turn_owner_unit.unit_manager_status = null;
            game_main.unit_manager.SetupBattle();
            NextUnitTurn();



            ActionManager.Add(new ActionBattleStart(0));
        }