using System; using System.Collections.Generic; using System.Text; namespace OnlineUserPool.Model { public class MapRecordRanking { public int UserId { get; set; } public string RecordFileName { get; set; } public int RouteId { get; set; } public int Ticks { get; set; } = -1; public Guid Id { get; set; } public string[] record { get; set; } public string WxHeadImg { get; set; } public string NickName { get; set; } /// /// 体重,用于计算功率体重比 /// public double Weight { get; set; } /// /// 总点位数据 /// public int Count { get { return this.record.Length; } } private int _BeginIndex; /// /// 当前位置 /// public int CurrentIndex { get; set; } = -1; /// /// 是否已到头 /// public bool End { get { return this.CurrentIndex >= this.Count; } } /// /// 获取当前点位的数据 /// /// public TargetData GetCurrentTargetData() { if(CurrentIndex > this.record.Length - 1) { return TargetData.Read(this.record[this.record.Length - 1]); } return TargetData.Read(this.record[CurrentIndex]); } public double GetPreDistance() { if (CurrentIndex < 1) return 0; return TargetData.Read(this.record[CurrentIndex - 1])._Distance; } } }