using GeoJSON.Net.Geometry; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Assets.Scenes.Ride.Scripts.Model.RiderModels { public class OnlineRiderModel : BaseRider { public override RiderType riderType => RiderType.Online; public double PreDistance { get; set; } = 0; public double WeightKg { get; set; } = 0; /// /// /// public GeographicPosition Point { get; set; } public OutUser GetOutUser(double preDistance, double currentDistance, TurfHelper turfHelper, CyclingStateEnum cyclingState) { if (this.IsSelf) { var newRealUser = new OutUser() { NickName = this.NickName, WxHeadImg = this.WxHeadImg, UserId = this.UserId, //targetData = targetData, InMapId = this.InMapId, PreDistance = preDistance, NextDistance = currentDistance, Point = turfHelper.Along(currentDistance), }; if (cyclingState != CyclingStateEnum.Cycling) { newRealUser.NextDistance = preDistance; } return newRealUser; } else { var newRealUser = new OutUser() { NickName = this.NickName, WxHeadImg = this.WxHeadImg, UserId = this.UserId, //targetData = targetData, InMapId = this.InMapId, PreDistance = this.PreDistance, NextDistance = this.EndDistance, Point = this.Point, //turfHelper.Along(this.EndDistance) }; return newRealUser; } } } }