void Load() { Action <string> onTableLoad = (text) => { string[] lines = text.Split(new string[] { "\r\n" }, System.StringSplitOptions.RemoveEmptyEntries); int count = lines.Length; if (count < 0) { return; } this.count = count; entities = new t_language[count]; for (int i = 0; i < count; i++) { string line = lines[i]; if (string.IsNullOrEmpty(line)) { Debug.LogError("data error, line " + i + " is null"); } string[] vals = line.Split('\t'); entities[i] = new t_language(); entities[i].ID = int.Parse(vals[0].Trim()); entities[i].EN = vals[1]; entities[i].IN = vals[2]; entities[i].CH = vals[3]; keyIndexMap[entities[i].ID] = i; } }; string fileName = t_language.FileName; FileMgr.ReadFile(fileName, onTableLoad); }
void Load() { Action <string> onTableLoad = (text) => { string[] lines = text.Split(new string[] { "\r\n" }, System.StringSplitOptions.RemoveEmptyEntries); int count = lines.Length; if (count < 0) { return; } this.count = count; entities = new t_subgame_award_lines[count]; for (int i = 0; i < count; i++) { string line = lines[i]; if (string.IsNullOrEmpty(line)) { Debug.LogError("data error, line " + i + " is null"); } string[] vals = line.Split('\t'); entities[i] = new t_subgame_award_lines(); entities[i].t_id = int.Parse(vals[0].Trim()); entities[i].subgame_id = int.Parse(vals[1].Trim()); entities[i].award_line_index = int.Parse(vals[2].Trim()); entities[i].coordinate_array = vals[3].Split('|').ToIntArray(); keyIndexMap[entities[i].t_id] = i; } }; string fileName = t_subgame_award_lines.FileName; FileMgr.ReadFile(fileName, onTableLoad); }
void Load() { Action <string> onTableLoad = (text) => { string[] lines = text.Split(new string[] { "\r\n" }, System.StringSplitOptions.RemoveEmptyEntries); int count = lines.Length; if (count < 0) { return; } this.count = count; entities = new t_icon[count]; for (int i = 0; i < count; i++) { string line = lines[i]; if (string.IsNullOrEmpty(line)) { Debug.LogError("data error, line " + i + " is null"); } string[] vals = line.Split('\t'); entities[i] = new t_icon(); entities[i].Key = vals[0]; entities[i].Value = vals[1].Split('|'); keyIndexMap[entities[i].Key] = i; } }; string fileName = t_icon.FileName; FileMgr.ReadFile(fileName, onTableLoad); }
void Load() { Action <string> onTableLoad = (text) => { string[] lines = text.Split(new string[] { "\r\n" }, System.StringSplitOptions.RemoveEmptyEntries); int count = lines.Length; if (count < 0) { return; } this.count = count; entities = new t_fruitboom_bonus_item_icon[count]; for (int i = 0; i < count; i++) { string line = lines[i]; if (string.IsNullOrEmpty(line)) { Debug.LogError("data error, line " + i + " is null"); } string[] vals = line.Split('\t'); entities[i] = new t_fruitboom_bonus_item_icon(); entities[i].t_id = int.Parse(vals[0].Trim()); entities[i].subgame_id = int.Parse(vals[1].Trim()); entities[i].icon_id = int.Parse(vals[2].Trim()); entities[i].package_name = vals[3]; entities[i].res_name = vals[4]; entities[i].des = vals[5]; keyIndexMap[entities[i].t_id] = i; } }; string fileName = t_fruitboom_bonus_item_icon.FileName; FileMgr.ReadFile(fileName, onTableLoad); }
void Load() { Action <string> onTableLoad = (text) => { string[] lines = text.Split(new string[] { "\r\n" }, System.StringSplitOptions.RemoveEmptyEntries); int count = lines.Length; if (count < 0) { return; } this.count = count; entities = new t_trail[count]; for (int i = 0; i < count; i++) { string line = lines[i]; if (string.IsNullOrEmpty(line)) { Debug.LogError("data error, line " + i + " is null"); } string[] vals = line.Split('\t'); entities[i] = new t_trail(); entities[i].ID = int.Parse(vals[0].Trim()); entities[i].Name = int.Parse(vals[1].Trim()); entities[i].UnitType = int.Parse(vals[2].Trim()); entities[i].Speed = float.Parse(vals[3].Trim()); entities[i].Damage = float.Parse(vals[4].Trim()); entities[i].Defence = float.Parse(vals[5].Trim()); entities[i].CoinReward = float.Parse(vals[6].Trim()); entities[i].CoinPrice = float.Parse(vals[7].Trim()); entities[i].BulletID = int.Parse(vals[8].Trim()); entities[i].DefaultLv = int.Parse(vals[9].Trim()); entities[i].MaxLv = int.Parse(vals[10].Trim()); entities[i].UnlockType = int.Parse(vals[11].Trim()); entities[i].UnlockValue = int.Parse(vals[12].Trim()); entities[i].AtlasName = vals[13]; entities[i].SpriteName = vals[14]; entities[i].PrefabName = vals[15]; entities[i].LocalPos = new Vector3(float.Parse(vals[16].Trim().Split('|')[0]), float.Parse(vals[16].Trim().Split('|')[1]), float.Parse(vals[16].Trim().Split('|')[2])); entities[i].PropertyPlus = vals[17]; entities[i].BulletPrefabName = vals[18]; entities[i].BulletName = vals[19]; entities[i].SmoothDamp = bool.Parse(vals[20].Trim()); entities[i].HasShootAnim = bool.Parse(vals[21].Trim()); entities[i].ShootAudioName = vals[22]; keyIndexMap[entities[i].ID] = i; } }; string fileName = t_trail.FileName; FileMgr.ReadFile(fileName, onTableLoad); }
void Load() { Action <string> onTableLoad = (text) => { string[] lines = text.Split(new string[] { "\r\n" }, System.StringSplitOptions.RemoveEmptyEntries); int count = lines.Length; if (count < 0) { return; } this.count = count; entities = new t_subgame_normal[count]; for (int i = 0; i < count; i++) { string line = lines[i]; if (string.IsNullOrEmpty(line)) { Debug.LogError("data error, line " + i + " is null"); } string[] vals = line.Split('\t'); entities[i] = new t_subgame_normal(); entities[i].t_id = int.Parse(vals[0].Trim()); entities[i].subgame_id = int.Parse(vals[1].Trim()); entities[i].name = vals[2]; entities[i].shown_name = vals[3]; entities[i].ui_package_name = vals[4]; entities[i].window_name = vals[5]; entities[i].logic_lua_ab_name = vals[6]; entities[i].spin_order_name = vals[7]; entities[i].hall_room_slot_eff = int.Parse(vals[8].Trim()); entities[i].hall_room_slot_special_eff = int.Parse(vals[9].Trim()); entities[i].hall_room_slot_icon = vals[10]; entities[i].hall_room_slot_special_icon = vals[11]; entities[i].has_jackpot = bool.Parse(vals[12].Trim()); entities[i].jackpot_shown_icon = vals[13]; entities[i].jackpot_shown_special_icon = vals[14]; entities[i].showcase_icon = vals[15]; entities[i].axes_count = int.Parse(vals[16].Trim()); entities[i].is_updating = bool.Parse(vals[17].Trim()); entities[i].updating_progress = int.Parse(vals[18].Trim()); entities[i].des = vals[19]; keyIndexMap[entities[i].t_id] = i; } }; string fileName = t_subgame_normal.FileName; FileMgr.ReadFile(fileName, onTableLoad); }
void Load() { Action <string> onTableLoad = (text) => { string[] lines = text.Split(new string[] { "\r\n" }, System.StringSplitOptions.RemoveEmptyEntries); int count = lines.Length; if (count < 0) { return; } this.count = count; entities = new t_bullet[count]; for (int i = 0; i < count; i++) { string line = lines[i]; if (string.IsNullOrEmpty(line)) { Debug.LogError("data error, line " + i + " is null"); } string[] vals = line.Split('\t'); entities[i] = new t_bullet(); entities[i].Name = vals[0]; entities[i].MoveSpeed = float.Parse(vals[1].Trim()); entities[i].HitType = int.Parse(vals[2].Trim()); entities[i].Area = float.Parse(vals[3].Trim()); entities[i].AutoDestroyType = int.Parse(vals[4].Trim()); entities[i].LifeTime = float.Parse(vals[5].Trim()); entities[i].Ylength = float.Parse(vals[6].Trim()); entities[i].HarmInterval = float.Parse(vals[7].Trim()); entities[i].UniqueParams = vals[8].Split('|').ToFloatArray(); entities[i].RestrictPos = bool.Parse(vals[9].Trim()); entities[i].HasPrepareAnim = bool.Parse(vals[10].Trim()); entities[i].HasVanishAnim = bool.Parse(vals[11].Trim()); entities[i].HasHitEffect = bool.Parse(vals[12].Trim()); entities[i].HitEffectName = vals[13]; entities[i].BoomAudioName = vals[14]; keyIndexMap[entities[i].Name] = i; } }; string fileName = t_bullet.FileName; FileMgr.ReadFile(fileName, onTableLoad); }
void Load() { Action <string> onTableLoad = (text) => { string[] lines = text.Split(new string[] { "\r\n" }, System.StringSplitOptions.RemoveEmptyEntries); int count = lines.Length; if (count < 0) { return; } this.count = count; entities = new t_subgame_win[count]; for (int i = 0; i < count; i++) { string line = lines[i]; if (string.IsNullOrEmpty(line)) { Debug.LogError("data error, line " + i + " is null"); } string[] vals = line.Split('\t'); entities[i] = new t_subgame_win(); entities[i].t_id = int.Parse(vals[0].Trim()); entities[i].subgame_id = int.Parse(vals[1].Trim()); entities[i].win_type = int.Parse(vals[2].Trim()); entities[i].trig_min_mul = int.Parse(vals[3].Trim()); entities[i].trig_max_mul = int.Parse(vals[4].Trim()); entities[i].has_eff = bool.Parse(vals[5].Trim()); entities[i].in_eff_id = int.Parse(vals[6].Trim()); entities[i].out_eff_id = int.Parse(vals[7].Trim()); entities[i].present_with_wincount = bool.Parse(vals[8].Trim()); keyIndexMap[entities[i].t_id] = i; } }; string fileName = t_subgame_win.FileName; FileMgr.ReadFile(fileName, onTableLoad); }
void Load() { Action <string> onTableLoad = (text) => { string[] lines = text.Split(new string[] { "\r\n" }, System.StringSplitOptions.RemoveEmptyEntries); int count = lines.Length; if (count < 0) { return; } this.count = count; entities = new t_germ[count]; for (int i = 0; i < count; i++) { string line = lines[i]; if (string.IsNullOrEmpty(line)) { Debug.LogError("data error, line " + i + " is null"); } string[] vals = line.Split('\t'); entities[i] = new t_germ(); entities[i].ID = int.Parse(vals[0].Trim()); entities[i].Name = vals[1]; entities[i].PrefabName = vals[2]; entities[i].RadiusParams = vals[3].Split('|').ToFloatArray(); entities[i].MoveSpeed = float.Parse(vals[4].Trim()); entities[i].HpHitRatio = vals[5].Split('|').ToFloatArray(); entities[i].IsSplit = bool.Parse(vals[6].Trim()); entities[i].SplitGermId = int.Parse(vals[7].Trim()); entities[i].ProtectTime = float.Parse(vals[8].Trim()); keyIndexMap[entities[i].ID] = i; } }; string fileName = t_germ.FileName; FileMgr.ReadFile(fileName, onTableLoad); }