Ejemplo n.º 1
0
    public void ReadFile(string filePath)
    {
        string rsult = string.Empty;

        AdvManager.Instance.useDebugMsg = true;
        try {
            var sr = new StreamReader(File.Open(filePath, FileMode.Open));
            rsult = sr.ReadToEnd();
            sr.Dispose();
        } catch (Exception e) {
            AdvUtility.Log("CSV 無法讀取, 確認是否有其他程式使用該檔案中 (" + e.Message + ")");
            return;
        }

        if (workFlowchart != null)
        {
            Destroy(workFlowchart.gameObject);
        }
        GameObject copyFlowchart = Instantiate(flowchartPrefab);

        workFlowchart = copyFlowchart.GetComponent <FlowchartExtend>();
        //workFlowchart = flowchartPrefab.GetComponent<Flowchart>();
        firstCall = workFlowchart.GetComponent <CallExtend>();

        //1. 開始 ADV系統
        //2. 清除舊的除錯訊息
        AdvManager.Instance.StartAdvScene();
        AdvDebugMsg.ClearMessage();
        AdvDebugMessageBox.ClearMessage();

        //顯示讀取結果面板
        ResultPanel.gameObject.SetActive(true);

        //開始讀取
        AdvUtility.CreateBlockByCSV(workFlowchart, rsult, false);
    }
Ejemplo n.º 2
0
 public static void LogBox(string msg)
 {
     AdvDebugMessageBox.AddMessage(msg);
 }
Ejemplo n.º 3
0
 private void Awake()
 {
     instance = this;
 }