//This code create by CodeEngine ,don't modify using System; using System.Collections.Generic; using System.Collections; using Module.Log; namespace GCGame.Table { public class Tab_Bullet{ public const string TAB_FILE_DATA = "Bullet"; private const int _varCount = 11; public int GetId() { return BulletID; } public static bool Validate(string line) { var segments = 0; foreach (char c in line) if (c == '\t') segments++; // Note: skip the 2nd column as it's the description; var result = segments == _varCount; if (!result) LogModule.ErrorLog(string.Format("Load {0} error as CodeSize:{1} not Equal DataSize:{2}", TAB_FILE_DATA, _varCount, segments)); return result; } public Tab_Bullet() { } public Tab_Bullet(string line) { var segments = line.Split('\t'); BulletID = int.Parse(segments[0]); EffectId = int.Parse(segments[2]); EndEffectId = int.Parse(segments[3]); Speed = float.Parse(segments[4]); MinDistance = float.Parse(segments[5]); AttackPoint = segments[6].Trim(); StartPosX = float.Parse(segments[7]); StartPosY = float.Parse(segments[8]); StartPosZ = float.Parse(segments[9]); BulletDirectionX = float.Parse(segments[10]); BulletDirectionY = float.Parse(segments[11]); } public int BulletID { get; private set; } public int EffectId { get; private set; } public int EndEffectId { get; private set; } public float Speed { get; private set; } public float MinDistance { get; private set; } public string AttackPoint { get; private set; } public float StartPosX { get; private set; } public float StartPosY { get; private set; } public float StartPosZ { get; private set; } public float BulletDirectionX { get; private set; } public float BulletDirectionY { get; private set; } } }