Ejemplo n.º 1
0
    IEnumerator robotRun()
    {
        for (int i = 0; i < TestingCount; ++i)
        {
            Debuger.SetOutputFile("debug" + i + ".txt");
            Debuger.Open();

            FrameRecording.instance.PlaySpeed         = PlaySpeed;
            FrameRecording.instance.renderPlayerSpeed = PlaySpeed - 0.1f;
            FrameRecording.instance.beginSimulation();

            while (!FrameRecording.instance.isGameOver)
            {
                yield return(new WaitForSeconds(1.0f));
            }

            FrameRecording.instance.stopSimulation();

            Debuger.Close();
        }
        yield return(null);

        string[] files = new string[TestingCount];
        //检测文件不同
        for (int i = 0; i < TestingCount; ++i)
        {
            files[i] = Application.persistentDataPath + "/debug" + i + ".txt";
        }
        bool sameFileContent = HelperTool.compareTextFile(files);

        if (sameFileContent)
        {
            Debug.Log("===================Same File Content");
        }
    }
Ejemplo n.º 2
0
    void OnDestroy()
    {
        LogicEvent.remove(this);

#if FRAME_RECORDING
        FrameRecording.terminate();
#endif

#if !SCENEEDITOR_TOOL
        LuaProxy.terminate();
#endif

        SceneViews.terminate();

        RealTimeRAProcessCenter.terminate();

        Profiler.terminate();

        Game.terminate();

        Debuger.Close();
    }