针对unity版本比赛功能的调整

This commit is contained in:
suntao committed 2021-07-07 09:49:36 +08:00
1 parent b9bb485a2d
commit c380654041
10 files changed
+393 -74

No files matched your search

+52 -3
View File
@@ -20,14 +20,31 @@ namespace OnlineUserPool.Model
SetProperty(ref _LastActiveTime, value);
}
}
private int _RouteId = 0;
/// <summary>
/// 地图编号
/// </summary>
public int RouteId { get; set; }
public int RouteId {
get {
return _RouteId;
}
set {
SetProperty(ref _RouteId, value);
}
}
private int _MemberId;
/// <summary>
/// 用户Id
/// </summary>
public int MemberId { get; set; }
public int MemberId {
get {
return _MemberId;
}
set {
SetProperty(ref _MemberId, value);
}
}
/// <summary>
/// 客户端过期
@@ -51,15 +68,37 @@ namespace OnlineUserPool.Model
/// </summary>
public List<int> ShowRouteId { get; set; }
private int _Competitionid = 0;
public int Competitionid {
get {
return _Competitionid;
} set {
SetProperty(ref _Competitionid, value);
}
}
///// <summary>
///// 是否展示在线的人
///// </summary>
//public bool ShowVirtual { get; set; }
public string Encoding { get; set; }
public string Client { get; set; }
private int _V = 0;
/// <summary>
/// 客户端支持的消息格式的版本号
/// </summary>
public int V { get; set; }
public int V {
get
{
return _V;
}
set
{
SetProperty(ref _V, value);
}
}
[Newtonsoft.Json.JsonIgnore]
public IService Service { get; set; }
@@ -72,5 +111,15 @@ namespace OnlineUserPool.Model
return Service.ToString();
}
}
private bool _IsWatch;
public bool IsWatch
{
get { return _IsWatch; }
set
{
SetProperty(ref _IsWatch, value);
}
}
}
}
+4 -13
View File
@@ -5,7 +5,7 @@ using System.Text;
namespace OnlineUserPool.Model
{
public class MsgModel
public class MsgModel : ReceiveModel
{
public int RouteId { get; set; }
public int MemberId { get; set; }
@@ -22,14 +22,6 @@ namespace OnlineUserPool.Model
public double PreDistance { get; set; }
public double EndDistance { get; set; }
/// <summary>
/// 是否展示在线的人
/// </summary>
//public bool ShowVirtual { get; set; }
/// <summary>
/// 命令类型,0命令,1消息
/// </summary>
public byte CommandType { get; set; }
//public bool IsVirtual { get; set; }
@@ -43,10 +35,9 @@ namespace OnlineUserPool.Model
public int Competitionid { get; set; }
public bool Saved { get; set; }
/// <summary>
/// 能处理的消息格式的版本号
/// </summary>
public int V { get; set; }
//public bool ShowVirtual { get; set; }
public string ToString(int v)
+38
View File
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OnlineUserPool.Model
{
public class ReceiveModel
{
/// <summary>
/// 命令类型,0ping命令,1消息, 2设置客户端信息, 3观察者模式
/// </summary>
public byte CommandType { get; set; }
/// <summary>
/// 能处理的消息格式的版本号
/// </summary>
public int V { get; set; }
}
public class SetClientCommand : ReceiveModel
{
public string Encoding { get; set; }
public string Client { get; set; }
public int Competitionid { get; set; }
public bool IsWatch { get; set; }
public int MemberId { get; set; }
}
public class SetWatchCommand :ReceiveModel
{
public int Competitionid { get; set; }
}
}
+4 -1
View File
@@ -7,7 +7,10 @@ namespace OnlineUserPool.Model
public class TargetData
{
public double _Power = 0d;
public double _Speed = 0;
/// <summary>
/// km/h
/// </summary>
public double _Speed { get; set; } = 0;
public double _Distance = 0D;
public double? _Cadence = 0;
public int? _HeartRate = 0;