protected override void gameConfigCreate(string fileName, string name) { System.IO.StreamReader stream = new System.IO.StreamReader(fileName); string line = ""; _dicKeyValue.Clear(); int count = 0; while ((line = stream.ReadLine()) != null) { count++; if (count < 3) { continue; } if (line == "") { continue; } // TODO string[] worlds = line.Split('\t'); int realItemID = getInt(worlds[0]); string itemName = getStr(worlds[1]); int happyPoint = getInt(worlds[2]); int Minute = getInt(worlds[3]); int num = getInt(worlds[4]); int timeRefleshCng = getInt(worlds[5]); int canReplace = getInt(worlds[6]); HappyData hd = new HappyData(); hd.itemID = realItemID; hd.needHappyPoint = happyPoint; hd.MinuteForReflesh = Minute; hd.RefleshNum = num; hd.name = itemName; hd.timeRefleshCng = timeRefleshCng; hd.canReplace = canReplace; _dicKeyValue.Add(realItemID, hd); } foreach (var key in _dicKeyValue.Keys) { ConsoleLog.showNotifyInfo(key + ":" + _dicKeyValue[key]); } stream.Close(); }
public memoryRealInfoDataModel() { d = new HappyData(); }