示例#1
0
    private void Start()
    {
        // Creating a new Item list
        listItem = new List <Item>();

        // Create FilePath
        strFile = "Items.txt";

        // Get Contents from FilePath
        strAry = refCore.CSVReader(strFile);

        // Instantiate all items from the FilePath
        for (int i = 0; i < strAry.Length; i++)
        {
            string[] strSplit = strAry[i].Split(',');
            listItem.Add(new Item(int.Parse(strSplit[0]), int.Parse(strSplit[1]), strSplit[2], strSplit[3]));
        }
    }