//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_SceneCameraStartPos{ public const string TAB_FILE_DATA = "SceneCameraStartPos"; private const int _varCount = 7; public int GetId() { return SceneID; } 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_SceneCameraStartPos() { } public Tab_SceneCameraStartPos(string line) { var segments = line.Split('\t'); SceneID = int.Parse(segments[0]); Pitch = float.Parse(segments[2]); Yaw = float.Parse(segments[3]); Distance = float.Parse(segments[4]); ViewMax = int.Parse(segments[5]); ViewMin = int.Parse(segments[6]); Force = int.Parse(segments[7]); } public int SceneID { get; private set; } public float Pitch { get; private set; } public float Yaw { get; private set; } public float Distance { get; private set; } public int ViewMax { get; private set; } public int ViewMin { get; private set; } public int Force { get; private set; } } }