コード例 #1
0
ファイル: InputText.cs プロジェクト: akiaki151/Futurecreation
    private void InputTagData(string TagName, string FileName)
    {
        string TextData = TagName + FileName;

        m_dropdown = GameObject.Find("TextNum").GetComponentInChildren <Dropdown>();
        FileData(TextData, m_dropdown.value + 1);
        DisplayText m_tc = GameObject.Find("TextContlloer").GetComponent <DisplayText>();

        m_tc.ClearText();
        Backlog m_bl = GameObject.Find("BackLog").GetComponent <Backlog>();

        m_bl.ImportLog();
    }
コード例 #2
0
ファイル: InputText.cs プロジェクト: akiaki151/Futurecreation
    public void DeleteLine()
    {
        Load();

        int num = 0;
        //各情報を格納
        string str = "";

        m_dropdown = GameObject.Find("TextNum").GetComponentInChildren <Dropdown>();

        //変更された情報の書き出し
        GameObject NowFile = GameObject.Find("NowTextFile");

        fileName = NowFile.GetComponent <Image>().GetComponentInChildren <Text>().text + ".txt";
        path     = Application.persistentDataPath + "/Data/" + fileName;
        StreamWriter sw = new StreamWriter(path, false, Encoding.UTF8);

        for (int i = 0; i < Engin_Const.line_size; i++)
        {
            if (m_dropdown.value != i)
            {
                sw.WriteLine(csvData[num]);
                num++;
            }
            else if (m_dropdown.value == i)
            {
                if (csvData[m_dropdown.value] != "")
                {
                    sw.WriteLine(str);
                    num++;
                }
                else if (csvData[m_dropdown.value] == "")
                {
                    var list = new List <string>();
                    list.AddRange(csvData);
                    list.RemoveAt(m_dropdown.value);
                    csvData = list.ToArray();
                }
            }
        }
        sw.Close();

        DisplayText m_tc = GameObject.Find("TextContlloer").GetComponent <DisplayText>();

        m_tc.ClearText();
        Backlog m_bl = GameObject.Find("BackLogCanvas").GetComponent <Backlog>();

        m_bl.ImportLog();
    }
コード例 #3
0
ファイル: InputText.cs プロジェクト: akiaki151/Futurecreation
    public void NextFileInput()
    {
        Dropdown SceneTag = GameObject.Find("LoadFileDropdown").GetComponent <Dropdown>();
        string   TextData = "#Getscenario=" + SceneTag.options[SceneTag.value].text;

        m_dropdown = GameObject.Find("TextNum").GetComponentInChildren <Dropdown>();
        FileData(TextData, m_dropdown.value + 1);

        DisplayText m_tc = GameObject.Find("TextContlloer").GetComponent <DisplayText>();

        m_tc.ClearText();
        Backlog m_bl = GameObject.Find("BackLog").GetComponent <Backlog>();

        m_bl.ImportLog();
    }
コード例 #4
0
ファイル: InputText.cs プロジェクト: akiaki151/Futurecreation
    public void NextSceneInput()
    {
        InputField NextTag  = GameObject.Find("LoadSceneInput").GetComponent <InputField>();
        string     TextData = "#Next=" + NextTag.text;

        m_dropdown = GameObject.Find("TextNum").GetComponentInChildren <Dropdown>();
        FileData(TextData, m_dropdown.value + 1);

        DisplayText m_tc = GameObject.Find("TextContlloer").GetComponent <DisplayText>();

        m_tc.ClearText();
        Backlog m_bl = GameObject.Find("BackLog").GetComponent <Backlog>();

        m_bl.ImportLog();
        NextTag.text = "";
    }
コード例 #5
0
ファイル: InputText.cs プロジェクト: akiaki151/Futurecreation
    //文字列保存
    public void InputData()
    {
        m_InputText = GameObject.Find("InputTextField").GetComponent <InputField>();
        string TextData = "{" + m_InputText.text + "}";

        m_dropdown = GameObject.Find("TextNum").GetComponentInChildren <Dropdown>();
        FileData(TextData, m_dropdown.value + 1);

        DisplayText m_tc = GameObject.Find("TextContlloer").GetComponent <DisplayText>();

        m_tc.ClearText();
        Backlog m_bl = GameObject.Find("BackLogCanvas").GetComponent <Backlog>();

        m_bl.ImportLog();

        InitData();
    }