伴侣骑行
This commit is contained in:
1 parent
34cde86a28
commit
7744eec847
42 files changed
+18737
-13497
No files matched your search
@@ -17,15 +17,16 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
public AbstractMap map;
|
||||
public GameObject player;
|
||||
public GameObject UIObject;
|
||||
public SelectParamModel selectParamModel;
|
||||
|
||||
#region 参数
|
||||
private MapDataModel mapData;//当前路书数据
|
||||
private double[] coordiantes;//当前地图中心
|
||||
private int currentUserId;//当前选中的用户id
|
||||
private bool isStart;//当前游戏是否开始
|
||||
public bool isStart;//当前游戏是否开始
|
||||
private DateTime startTime;//开始时间
|
||||
private bool initComplete;
|
||||
private CyclingModel cyclingModel;//当前骑行模式
|
||||
|
||||
public CyclingModel cyclingModel;//当前骑行模式
|
||||
public BaseCycling cyclingController { get; set; }
|
||||
private int RouteId;
|
||||
private MapApi mapApi;
|
||||
@@ -34,8 +35,8 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
|
||||
void Awake()
|
||||
{
|
||||
initComplete = false;
|
||||
cyclingModel = CyclingModel.Single;
|
||||
InitParam();
|
||||
//获取路书信息
|
||||
mapApi = new MapApi();
|
||||
RouteId = App.RouteIdParam > 0? App.RouteIdParam : 376;
|
||||
@@ -61,19 +62,19 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
cyclingController = new SingleModel(mapRoute);
|
||||
//cyclingModel.OpenCyclingWindow();
|
||||
break;
|
||||
//case CyclingModel.Online:
|
||||
// CyclingModel = new OnlineModel(Route, param);
|
||||
// //cyclingModel.OpenCyclingWindow();
|
||||
// break;
|
||||
//case CyclingModel.Review:
|
||||
// if (param.RankingsId.Count == 0)
|
||||
// {
|
||||
// UIHelper.ShowError(View.GetLang("MapboxController.PSelectARider"));//请选择骑行人
|
||||
// return;
|
||||
// }
|
||||
// CyclingModel = new ReviewModel(Route, param);
|
||||
// //cyclingModel.OpenCyclingWindow();
|
||||
// break;
|
||||
//case CyclingModel.Online:
|
||||
// CyclingModel = new OnlineModel(Route, param);
|
||||
// cyclingModel.OpenCyclingWindow();
|
||||
// break;
|
||||
//case CyclingModel.Review:
|
||||
// if (selectParamModel.RankingsId.Count == 0)
|
||||
// {
|
||||
// //TODO:弹窗请选择跟随骑行的人
|
||||
// return;
|
||||
// }
|
||||
// CyclingModel = new ReviewModel(Route, param);
|
||||
//cyclingModel.OpenCyclingWindow();
|
||||
// break;
|
||||
//case Model.CyclingModel.Competition:
|
||||
// CyclingModel = new CompetitionModel(Route, param);
|
||||
// //cyclingModel.OpenCyclingWindow();
|
||||
@@ -90,7 +91,6 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
{
|
||||
mapData = result;
|
||||
coordiantes = result.List[0].Point;//TODO计算当前用户所处的位置
|
||||
initComplete = true;
|
||||
Init();
|
||||
}
|
||||
else
|
||||
@@ -98,11 +98,18 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
throw new System.Exception("fail to get route data");
|
||||
}
|
||||
}
|
||||
|
||||
private void InitParam()
|
||||
{
|
||||
selectParamModel = new SelectParamModel();
|
||||
selectParamModel.RouteId = App.RouteIdParam;
|
||||
selectParamModel.RankingsId = new List<string>();
|
||||
}
|
||||
private void Init()
|
||||
{
|
||||
//加载人物和地图以及UI界面
|
||||
map.gameObject.SetActive(true);
|
||||
player.SetActive(true);
|
||||
//player.SetActive(true);
|
||||
UIObject.SetActive(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user