public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); index++; AssetName = text[index++]; Level = int.Parse(text[index++]); CombatLevel = int.Parse(text[index++]); RepairLevel = int.Parse(text[index++]); DriveLevel = int.Parse(text[index++]); HP = int.Parse(text[index++]); Attack = int.Parse(text[index++]); Defence = int.Parse(text[index++]); Strength = int.Parse(text[index++]); Intelligence = int.Parse(text[index++]); Speed = int.Parse(text[index++]); PhysicalPower = int.Parse(text[index++]); Exp = int.Parse(text[index++]); InitEquipIds = Split(text[index++]); var str = text[index++]; // 初始道具可能为空 if (str.Length > 0) { InitItemIds = Split(str); } else { InitItemIds = new List <int>(); } }
public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); PartType = (VehiclePartType)int.Parse(text[index++]); Attack = int.Parse(text[index++]); Defence = int.Parse(text[index++]); RangeType = (InfluenceRangeType)int.Parse(text[index++]); Magazine = int.Parse(text[index++]); Weight = float.Parse(text[index++]); Load = float.Parse(text[index++]); MaxDefence = int.Parse(text[index++]); MaxMagazine = int.Parse(text[index++]); MaxWeight = float.Parse(text[index++]); int[] hole = Split(text[index++]); MainHole = hole[0] == 1; SubHole = hole[1] == 1; SEHole = hole[2] == 1; int[] gunLocation = Split(text[index++]); MainGunLocation = gunLocation[0] == 1; SubGunLocation = gunLocation[1] == 1; SEGunLocation = gunLocation[2] == 1; CanTrans = bool.Parse(text[index++]); TransPrice = int.Parse(text[index++]); TransId = int.Parse(text[index++]); }
public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); PartType = (HumanPartType)int.Parse(text[index++]); int[] canWorn = Split(text[index++]); UsablePlayerTypes = new List <PlayerType>(); if (canWorn[0] == 1) { UsablePlayerTypes.Add(PlayerType.Rebana); } if (canWorn[1] == 1) { UsablePlayerTypes.Add(PlayerType.Cliff); } if (canWorn[2] == 1) { UsablePlayerTypes.Add(PlayerType.Margaret); } Attack = int.Parse(text[index++]); Defence = int.Parse(text[index++]); RangeType = (InfluenceRangeType)int.Parse(text[index++]); }
public void ParseDataRow(string dataRowText) { var text = DataTableExtension.SplitDataRow(dataRowText); var index = 0; index++; Id = int.Parse(text[index++]); Name = text[index++]; Items = Split(text[index++]); }
public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); index++; AssetName = text[index++]; }
public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); Level = int.Parse(text[index++]); Exp = int.Parse(text[index++]); }
/// <summary> /// 分割NPC编号字符串 /// </summary> /// <param name="npcs"></param> /// <returns></returns> private List <int> SplitNPCs(string npcs) { string[] text = DataTableExtension.SplitValue(npcs); List <int> npcList = new List <int>(); foreach (var s in text) { npcList.Add(int.Parse(s)); } return(npcList); }
/// <summary> /// 分割字符串 /// </summary> /// <param name="str"></param> /// <returns></returns> private List <int> Split(string str) { var text = DataTableExtension.SplitValue(str); var list = new List <int>(); foreach (var s in text) { list.Add(int.Parse(s)); } return(list); }
public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); index++; AssetName = text[index++]; Position = SplitPosition(text[index++]); BackgroundMusicId = int.Parse(text[index++]); NPCs = SplitNPCs(text[index++]); }
public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); index++; AssetName = text[index++]; UIGroupName = text[index++]; AllowMultiInstance = bool.Parse(text[index++]); Log.Debug("AllowMultiInstance = " + AllowMultiInstance); PauseCoveredUIForm = bool.Parse(text[index++]); }
public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); index++; AssetName = text[index++]; Priority = int.Parse(text[index++]); Loop = bool.Parse(text[index++]); Volume = float.Parse(text[index++]); SpatialBlend = float.Parse(text[index++]); MaxDistance = float.Parse(text[index++]); }
public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); Name = text[index++]; Icon = text[index++]; Description = text[index++]; ItemType = (ItemType) int.Parse(text[index++]); StackCount = int.Parse(text[index++]); Discard = bool.Parse(text[index++]); BuyPrice = int.Parse(text[index++]); SellPrice = int.Parse(text[index++]); }
public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); index++; AssetName = text[index++]; NpcType = (NPCType)int.Parse(text[index++]); StoreId = int.Parse(text[index++]); BornPosition = SplitPosition(text[index++]); BornAnimation = text[index++]; Conversation = text[index++]; Patrol = bool.Parse(text[index++]); }
public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); GoodsType = (GoodsType)int.Parse(text[index++]); UseType = int.Parse(text[index++]); CanCombat = bool.Parse(text[index++]); ConsumeType = (GoodsConsumeType)int.Parse(text[index++]); HP = int.Parse(text[index++]); PAG = int.Parse(text[index++]); Attack = int.Parse(text[index++]); RangeType = (InfluenceRangeType)int.Parse(text[index++]); }
public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); Level = int.Parse(text[index++]); CombatLevel = int.Parse(text[index++]); RepairLevel = int.Parse(text[index++]); DriveLevel = int.Parse(text[index++]); HP = int.Parse(text[index++]); Strength = int.Parse(text[index++]); Intelligence = int.Parse(text[index++]); Speed = int.Parse(text[index++]); PhysicalPower = int.Parse(text[index++]); }
public void ParseDataRow(string dataRowText) { string[] text = DataTableExtension.SplitDataRow(dataRowText); int index = 0; index++; Id = int.Parse(text[index++]); index++; Name = text[index++]; SpriteName = text[index++]; AssetName = text[index++]; Type = (MonsterType)int.Parse(text[index++]); HP = int.Parse(text[index++]); ActionCount = float.Parse(text[index++]); Attack = int.Parse(text[index++]); Defence = int.Parse(text[index++]); Armor = int.Parse(text[index++]); Speed = int.Parse(text[index++]); Hit = int.Parse(text[index++]); Dodge = int.Parse(text[index++]); Exp = int.Parse(text[index++]); Gold = int.Parse(text[index++]); DropId = int.Parse(text[index++]); }
/// <summary> /// 分割字符串 /// </summary> /// <param name="str"></param> /// <returns></returns> private int[] Split(string str) { string[] text = DataTableExtension.SplitValue(str); return(new[] { int.Parse(text[0]), int.Parse(text[1]), int.Parse(text[2]) }); }
/// <summary> /// 分割位置信息字符串 /// </summary> /// <param name="position"></param> /// <returns></returns> private Vector3 SplitPosition(string position) { string[] text = DataTableExtension.SplitValue(position); return(new Vector3(float.Parse(text[0]), float.Parse(text[1]), float.Parse(text[2]))); }
private List <int> Split(string str) { var text = DataTableExtension.SplitValue(str); return(text.Select(int.Parse).ToList()); }