对战AR
This commit is contained in:
1 parent
509c309252
commit
11b131b24a
60 files changed
+2505
-632
No files matched your search
@@ -68,10 +68,8 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
return;
|
||||
var totalDitance = manager.GetMapData().TotalDistance;
|
||||
var currentDistance = manager.CurrentPlayer.totalDistance;
|
||||
|
||||
//var currenList = FindObjectsOfType<ListItem>();//当前列表
|
||||
var currenList = GetComponentsInChildren<ListItem>(true);
|
||||
var list = MapUDPService.GetOnlineUsers(App.RouteIdParam);//最新列表
|
||||
var list = MapUDPService.GetOnlineUsers(App.RouteIdParam,manager.cyclingController.recorderData.RoomId);//最新列表
|
||||
var currentPlayerInfo = list.Where(c => c.Id.ToString() == manager.CurrentPlayer.UserId.ToString()).FirstOrDefault();
|
||||
list = list.Where(c => c.Id != App.CurrentUser.Id).ToList();
|
||||
if (currenList.Count() == 0 && list.Count() > 0)
|
||||
@@ -82,10 +80,8 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
_recyclableScrollRect.ReloadData();
|
||||
}
|
||||
}
|
||||
//var currenList = FindObjectsOfType<ListItem>();//当前列表
|
||||
//var list = MapUDPService.GetOnlineUsers(App.RouteIdParam);//最新列表
|
||||
|
||||
var currentPlayer = FindObjectOfType<VideoPlayer>();
|
||||
|
||||
|
||||
foreach (ListItem o in currenList)
|
||||
{
|
||||
|
||||
@@ -63,15 +63,6 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
private void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
#if UNITY_EDITOR
|
||||
App.RouteIdParam = 12353;
|
||||
//自动登录
|
||||
if (App.CurrentUser == null)
|
||||
{
|
||||
Login();
|
||||
UIManager.InitNow();//重置当前时间
|
||||
}
|
||||
#endif
|
||||
mediaPlayer = FindObjectOfType<MediaPlayer>();
|
||||
DeviceCache.Init(PFConstants.DeviceCacheFolder);
|
||||
var check = CheckAnt();//初始化蓝牙设备
|
||||
@@ -108,11 +99,7 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
};
|
||||
}
|
||||
endDistance = 0;
|
||||
////倒计时5s开始
|
||||
//SetCyclingModel(CyclingModel.Single);
|
||||
videoLoading = FindObjectOfType<VideoLoading>();
|
||||
|
||||
|
||||
}
|
||||
private IEnumerator Init()
|
||||
{
|
||||
@@ -483,7 +470,6 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
cyclingController.recorderData.ManufacturerName = ManufacturerName;
|
||||
cyclingController.recorderData.DeviceNumber = DeviceNumber;
|
||||
cyclingController.recorderData.LastFrame = GetCurrentFrame();
|
||||
cyclingController.recorderData.RoomId = App.gameRoomDetail?.RoomId;//房间ID
|
||||
RankingId = cyclingController.recorderData.SaveWithLocalRecordAysnc(cyclingModel, selectParamModel, imageFileName, recordId, path);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ using UnityEngine.EventSystems;
|
||||
using Assets.Scenes.Ride.Scripts;
|
||||
using Assets.Scripts.Apis.Models;
|
||||
using System.Linq;
|
||||
using Assets.Scenes.Ride.Scripts.Model;
|
||||
|
||||
namespace Assets.Scripts.Scenes.VideoRide
|
||||
{
|
||||
@@ -222,7 +223,7 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
var ui = manager.GetCanvasTransform();
|
||||
canvasGroup.DOFade(0, 0).onComplete += () => {
|
||||
gameObject.SetActive(false);
|
||||
manager.SetCyclingModel(Assets.Scenes.Ride.Scripts.Model.CyclingModel.GameRoom);
|
||||
manager.SetCyclingModel(CyclingModel.GameRoom);
|
||||
manager.SetCurrentMode(VideoGameManager.ARMode.RIDE);
|
||||
ui.Find("Panel").gameObject.SetActive(true);
|
||||
};
|
||||
@@ -243,12 +244,12 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
, (p) =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(p)) {
|
||||
slider.value = 100;
|
||||
manager.SetMedia(p);
|
||||
Debug.LogError(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("");
|
||||
slider.value = 100;
|
||||
manager.SetMedia(p);
|
||||
}
|
||||
}
|
||||
));
|
||||
|
||||
Reference in new issue
Block a user