예제 #1
0
        public static void LoadFromFile()
        {
            List <string> list  = new List <string>();
            TextAsset     asset = Miscs.LoadResource("Data/_ExcelOutput/PlotData", BundleType.DATA_FILE) as TextAsset;

            char[]   separator = new char[] { "\n"[0] };
            string[] strArray  = asset.text.Split(separator);
            for (int i = 0; i < strArray.Length; i++)
            {
                if (strArray[i].Length >= 1)
                {
                    list.Add(strArray[i]);
                }
            }
            int capacity = list.Count - 1;

            _itemDict = new Dictionary <int, PlotMetaData>();
            _itemList = new List <PlotMetaData>(capacity);
            for (int j = 1; j <= capacity; j++)
            {
                char[]       chArray2  = new char[] { "\t"[0] };
                string[]     strArray2 = list[j].Split(chArray2);
                PlotMetaData item      = new PlotMetaData(int.Parse(strArray2[0]), int.Parse(strArray2[1]), int.Parse(strArray2[2]), int.Parse(strArray2[3]));
                _itemList.Add(item);
                _itemDict.Add(item.plotID, item);
            }
        }
예제 #2
0
 public PlotDataItem(PlotMetaData plotMetaData)
 {
     this.plotID        = plotMetaData.plotID;
     this.levelID       = plotMetaData.levelID;
     this.startDialogID = plotMetaData.startDialogID;
     this.endDialogID   = plotMetaData.endDialogID;
 }
예제 #3
0
        private void ReadPlotData()
        {
            PlotMetaData plotMetaDataByKey = PlotMetaDataReader.GetPlotMetaDataByKey(this._plotID);

            this._plotData = plotMetaDataByKey;
            for (int i = plotMetaDataByKey.startDialogID; i <= plotMetaDataByKey.endDialogID; i++)
            {
                DialogMetaData dialogMetaDataByKey = DialogMetaDataReader.GetDialogMetaDataByKey(i);
                this._dialogList.Add(dialogMetaDataByKey);
            }
        }