Exemplo n.º 1
0
    private void LoadZoneInfo()
    {
        StreamReader reader = new StreamReader(string.Concat(trainFolder, trainFile));
        string       line;

        do
        {
            line = reader.ReadLine();
            if (line != null)
            {
                string[] entries = line.Split(' ');
                if (entries.Length > 0)
                {
                    positionList.Add(new Vector3(float.Parse(entries[0]), 0f, float.Parse(entries[1])));
                    intentDirectionList.Add(new Vector3(float.Parse(entries[2]), 0f, float.Parse(entries[3])));
                    limitAngleList.Add(new Vector3(float.Parse(entries[4]), 0f, float.Parse(entries[5])));
                    multList.Add(float.Parse(entries[6]));

                    int leftLbl = recorder.ProcessLabel(entries[7]);
                    if (leftLbl < 0)
                    {
                        Debug.Log("Error of left label, check input-zone.csv!");
                    }
                    else
                    {
                        leftLabelList.Add(leftLbl);
                    }

                    int rightLbl = recorder.ProcessLabel(entries[8]);
                    if (rightLbl < 0)
                    {
                        Debug.Log("Error of right label, check input-zone.csv!");
                    }
                    else
                    {
                        rightLabelList.Add(rightLbl);
                    }
                }
            }
        }while (line != null);
        reader.Close();
    }