AR骑行beta
This commit is contained in:
1 parent
4d5bc8f080
commit
9b1bb3d9ba
45 files changed
+35055
-2401
No files matched your search
@@ -67,6 +67,14 @@ class GameRoomDownLoad : MonoBehaviour
|
||||
});
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(FileName) && Loom.DownLoadTaskList.ContainsKey(FileName))
|
||||
{
|
||||
processing(Loom.DownLoadTaskList[FileName]);
|
||||
}
|
||||
}
|
||||
|
||||
public void Init(int Id,string fileName,string url, GameRoomListController gameRoomListController)
|
||||
{
|
||||
RoomId = Id;
|
||||
@@ -74,6 +82,12 @@ class GameRoomDownLoad : MonoBehaviour
|
||||
FileUrl = url;
|
||||
manager = gameRoomListController;
|
||||
}
|
||||
public void ComeIntoStep2(string fileName)
|
||||
{
|
||||
FileName = fileName;
|
||||
step2.SetActive(true);
|
||||
step3.SetActive(false);
|
||||
}
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
@@ -86,6 +100,18 @@ class GameRoomDownLoad : MonoBehaviour
|
||||
Reset();
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
private void processing(float p)
|
||||
{
|
||||
downloadSlider.value = p;
|
||||
if (Loom.DownLoadTaskList.ContainsKey(FileName))
|
||||
{
|
||||
Loom.DownLoadTaskList[FileName] = p;
|
||||
}
|
||||
else
|
||||
{
|
||||
Loom.DownLoadTaskList.Add(FileName, p);
|
||||
}
|
||||
}
|
||||
|
||||
private void DownloadClick(BaseEventData baseEventData)
|
||||
{
|
||||
@@ -105,16 +131,8 @@ class GameRoomDownLoad : MonoBehaviour
|
||||
Loom.Current.StartCoroutine(Utils.DownloadVideo(fileName, url
|
||||
, (p, req) =>
|
||||
{
|
||||
downloadSlider.value = p;
|
||||
currentTask.UpdateProcess(p);
|
||||
if (Loom.DownLoadTaskList.ContainsKey(FileName))
|
||||
{
|
||||
Loom.DownLoadTaskList[FileName] = p;
|
||||
}
|
||||
else
|
||||
{
|
||||
Loom.DownLoadTaskList.Add(FileName, p);
|
||||
}
|
||||
processing(p);
|
||||
}
|
||||
, (p) =>
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ class GameRoomDownloadTask : MonoBehaviour
|
||||
UIManager.AddEvent(btn, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
modal.SetActive(true);
|
||||
modal.GetComponent<GameRoomDownLoad>().ComeIntoStep2(FileName);
|
||||
transform.parent.parent.parent.gameObject.SetActive(false);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class GameRoomMapItem : MonoBehaviour, IPointerExitHandler, IPointerEnter
|
||||
if (gameObject != null)
|
||||
{
|
||||
slider.value = process;
|
||||
ShowOutLine();
|
||||
Ride();
|
||||
transform.Find("DownLoadModal").gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public class GameRoomMapItem : MonoBehaviour, IPointerExitHandler, IPointerEnter
|
||||
var fileName = map.FileName;
|
||||
var path = PFConstants.VideoFolder;
|
||||
var filepath = path + "/" + fileName;
|
||||
//if ((map.EnableAR && !File.Exists(filepath) )|| !map.EnableAR)
|
||||
if ((map.EnableAR && File.Exists(filepath) )|| !map.EnableAR)
|
||||
{
|
||||
var list = FindObjectsOfType<GameRoomMapItem>();
|
||||
foreach (var item in list)
|
||||
|
||||
@@ -43,20 +43,19 @@ class GameRoomPlayerPanel : MonoBehaviour
|
||||
|
||||
UIManager.AddEvent(gameObject, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
if (App.gameRoomDetail.UserId != App.CurrentUser.Id)
|
||||
if (App.gameRoomDetail.UserId == UserId)
|
||||
return;
|
||||
kickModal.SetActive(true);
|
||||
});
|
||||
UIManager.AddEvent(cancelBtn, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
if (App.gameRoomDetail.UserId != App.CurrentUser.Id)
|
||||
return;
|
||||
kickModal.SetActive(false);
|
||||
});
|
||||
UIManager.AddEvent(kickBtn, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
if (App.gameRoomDetail.UserId != App.CurrentUser.Id)
|
||||
return;
|
||||
kickModal.SetActive(false);
|
||||
MapUDPService.SendGameRoomKick(App.gameRoomDetail.RoomId, UserId, App.CurrentUser.Id);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
using Assets.Scenes.Ride.Scripts.Model.CyclingModels;
|
||||
using Assets.Scripts;
|
||||
using Assets.Scripts.UI.UIEffect;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using Assets.Scenes.Ride.Scripts;
|
||||
using Assets.Scripts.Scenes.VideoRide;
|
||||
using System;
|
||||
|
||||
public class GameRoomResult : MonoBehaviour
|
||||
{
|
||||
VideoGameManager manager;
|
||||
RawImage Head;
|
||||
Text Ranking;
|
||||
Text Timer;
|
||||
GameObject Mine { get; set; }
|
||||
GameObject TitleImage { get; set; }
|
||||
GameObject WatchTitle { get; set; }
|
||||
GameObject RankingPanel { get; set; }
|
||||
GameObject ShareButton { get; set; }
|
||||
GameObject ToolBarPanel { get; set; }
|
||||
GameObject WeChatButton { get; set; }
|
||||
GameObject WeChatGpButton { get; set; }
|
||||
RawImage TopHead { get; set; }
|
||||
RawImage SecondHead { get; set; }
|
||||
RawImage ThirdHead { get; set; }
|
||||
Image Top { get; set; }
|
||||
Sprite SpriteTop { get; set; }
|
||||
Sprite SpriteSecond { get; set; }
|
||||
Sprite SpriteThrid { get; set; }
|
||||
|
||||
Text RankingTitle { get; set; }
|
||||
Text TimerTitle { get; set; }
|
||||
Text CloseTime { get; set; }
|
||||
Text CloseTitle { get; set; }
|
||||
private void Awake()
|
||||
{
|
||||
manager = FindObjectOfType<VideoGameManager>();
|
||||
var closeBtn = transform.Find("Close").gameObject;
|
||||
Head = transform.Find("Mine/Head").GetComponent<RawImage>();
|
||||
Ranking = transform.Find("Mine/Ranking").GetComponent<Text>();
|
||||
RankingTitle = transform.Find("Mine/RankingTitle").GetComponent<Text>();
|
||||
TimerTitle = transform.Find("Mine/TimerTitle").GetComponent<Text>();
|
||||
Timer = transform.Find("Mine/Timer").GetComponent<Text>();
|
||||
Top = transform.Find("Mine/TOP").GetComponent<Image>();
|
||||
Mine = transform.Find("Mine").gameObject;
|
||||
RankingPanel = transform.Find("Ranking").gameObject;
|
||||
TopHead = transform.Find("Ranking/TopHead").GetComponent<RawImage>();
|
||||
SecondHead = transform.Find("Ranking/SecondHead").GetComponent<RawImage>();
|
||||
ThirdHead = transform.Find("Ranking/ThirdHead").GetComponent<RawImage>();
|
||||
TitleImage = transform.Find("TitleImage").gameObject;
|
||||
WatchTitle = transform.Find("WatchTitle").gameObject;
|
||||
CloseTitle = transform.Find("CloseTitle").GetComponent<Text>();
|
||||
CloseTime = transform.Find("CloseTime").GetComponent<Text>();
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
ShareButton = transform.Find("ShareButton").gameObject;
|
||||
ToolBarPanel = transform.Find("ToolBarPanel").gameObject;
|
||||
WeChatButton = transform.Find("ToolBarPanel/WeChatButton").gameObject;
|
||||
WeChatGpButton = transform.Find("ToolBarPanel/GoogleButton").gameObject;
|
||||
UIManager.AddEvent(WeChatButton, UnityEngine.EventSystems.EventTriggerType.PointerClick, ShareWechat);
|
||||
UIManager.AddEvent(WeChatGpButton, UnityEngine.EventSystems.EventTriggerType.PointerClick, ShareWechatGp);
|
||||
var fbButton = transform.Find("ToolBarPanel/FaceBookButton").gameObject;
|
||||
UIManager.AddEvent(fbButton, EventTriggerType.PointerClick, shareFb);
|
||||
#endif
|
||||
SpriteTop = Resources.Load<Sprite>("Images/Ride/Match/top-1");
|
||||
SpriteSecond = Resources.Load<Sprite>("Images/Ride/Match/top-2");
|
||||
SpriteThrid = Resources.Load<Sprite>("Images/Ride/Match/top-3");
|
||||
|
||||
UIManager.AddEvent(closeBtn, UnityEngine.EventSystems.EventTriggerType.PointerClick, Close);
|
||||
}
|
||||
|
||||
|
||||
float time = 1;
|
||||
private void Update()
|
||||
{
|
||||
time -= Time.deltaTime;
|
||||
while (time < 0)
|
||||
{
|
||||
Refresh();
|
||||
time += 1;
|
||||
}
|
||||
}
|
||||
|
||||
private Color RED = new Color(0.9764706f, 0.1882353f, 0.5254902f);
|
||||
private Color SHALLOW_RED = new Color(1f, 0.454902f, 0.5215687f);
|
||||
|
||||
private Color PURPLE = new Color(0.1568628f, 0.4431373f, 0.8745098f);
|
||||
private Color SHALLOW_PURPLE = new Color(0.3843137f, 0.7764706f, 1f);
|
||||
|
||||
private Color BLUE = new Color(0.4352941f, 0.3333333f, 0.9372549f);
|
||||
private Color SHALLOW_BLUE = new Color(0.772549f, 0.5529412f, 1f);
|
||||
|
||||
private Color WHITE = new Color(1f, 1f, 1f);
|
||||
|
||||
|
||||
public void Refresh()
|
||||
{
|
||||
if (manager.cyclingController is GameModel model)
|
||||
{
|
||||
if (model == null)
|
||||
return;
|
||||
var list = model.mapWorkoutRecordRankings;
|
||||
if (list == null) return;
|
||||
var parent = transform.Find("ScrollView/Viewport/Content");
|
||||
Mine.SetActive(true);
|
||||
RankingPanel.SetActive(false);
|
||||
TitleImage.SetActive(true);
|
||||
WatchTitle.SetActive(false);
|
||||
|
||||
if (model.FirstEndTime.HasValue)
|
||||
{
|
||||
var gap = model.FirstEndTime.Value - UIManager.Now.GetDateTime();
|
||||
var seconds = (int)Math.Floor(gap.TotalSeconds);
|
||||
CloseTime.text = Helper.FormatTicks(seconds);
|
||||
CloseTitle.gameObject.SetActive(true);
|
||||
CloseTime.gameObject.SetActive(true);
|
||||
}
|
||||
//当前用户排名
|
||||
var currentRanking = list.Where(c => c.UserId == manager.CurrentPlayer.UserId).FirstOrDefault();
|
||||
if (currentRanking != null)
|
||||
{
|
||||
Utils.DisplayImage(Head, currentRanking.WxHeadImg, true);
|
||||
Ranking.text = currentRanking.Rank.ToString().PadLeft(3, '0');
|
||||
Timer.text = currentRanking.TotalTime;
|
||||
var uigradient = Mine.transform.GetComponent<UIGradient>();
|
||||
if (currentRanking.Rank <= 3)
|
||||
{
|
||||
TimerTitle.color = WHITE;
|
||||
RankingTitle.color = WHITE;
|
||||
}
|
||||
if (currentRanking.Rank == 1)
|
||||
{
|
||||
uigradient.color1 = RED;
|
||||
uigradient.color2 = SHALLOW_RED;
|
||||
Top.sprite = SpriteTop;
|
||||
Top.gameObject.SetActive(true);
|
||||
}
|
||||
if (currentRanking.Rank == 2)
|
||||
{
|
||||
uigradient.color1 = PURPLE;
|
||||
uigradient.color2 = SHALLOW_PURPLE;
|
||||
Top.sprite = SpriteSecond;
|
||||
Top.gameObject.SetActive(true);
|
||||
}
|
||||
if (currentRanking.Rank == 3)
|
||||
{
|
||||
uigradient.color1 = BLUE;
|
||||
uigradient.color2 = SHALLOW_BLUE;
|
||||
Top.sprite = SpriteThrid;
|
||||
Top.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
//排名列表
|
||||
var rankingList = FindObjectsOfType<FinalRankingItemScript>();
|
||||
foreach (var item in list)
|
||||
{
|
||||
var finalRankingItemScript = rankingList.Where(c => c.UserId == item.UserId).FirstOrDefault();
|
||||
//没有就创建
|
||||
if (finalRankingItemScript == null)
|
||||
{
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
var finalRankingItem = Instantiate(Resources.Load<GameObject>("UI/Prefab/Match/Mobile/FinalRankingItem"), parent);
|
||||
#else
|
||||
var finalRankingItem = Instantiate(Resources.Load<GameObject>("UI/Prefab/Match/FinalRankingItem"), parent);
|
||||
#endif
|
||||
finalRankingItemScript = finalRankingItem.GetComponent<FinalRankingItemScript>();
|
||||
}
|
||||
//有就更新
|
||||
finalRankingItemScript.setGap(item.Gap);
|
||||
finalRankingItemScript.setSource(item.Source);
|
||||
finalRankingItemScript.setUserId(item.UserId, item.WxHeadImg);
|
||||
finalRankingItemScript.setRanking(item.Rank);
|
||||
finalRankingItemScript.setHeartRate(item.HeartRate);
|
||||
finalRankingItemScript.setName(item.NickName);
|
||||
finalRankingItemScript.setPower(item.Power);
|
||||
finalRankingItemScript.setRatio(item.WeightKG);
|
||||
finalRankingItemScript.setTimer(item.TotalTime);
|
||||
finalRankingItemScript.transform.SetSiblingIndex(item.Rank);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Close(BaseEventData baseEventData)
|
||||
{
|
||||
this.gameObject.SetActive(false);
|
||||
this.Destroy();
|
||||
SceneManager.LoadScene("MainScene");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 873bd5947356d6f4d84526e63f9643fc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,4 +1,5 @@
|
||||
using Assets.Scripts.Apis.Models;
|
||||
using Assets.Scenes.Ride.Scripts;
|
||||
using Assets.Scripts.Apis.Models;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
@@ -6,6 +7,7 @@ using UnityEngine.UI;
|
||||
public class GameRoomCountDownController : PFUIPanel
|
||||
{
|
||||
public Text count;
|
||||
public Text endCount;
|
||||
|
||||
private int Seconds { get; set; }
|
||||
public GameRoomModel GameRoom { get; set; }
|
||||
@@ -22,10 +24,11 @@ public class GameRoomCountDownController : PFUIPanel
|
||||
base.Show();
|
||||
}
|
||||
|
||||
public void Init(int seconds,Action action)
|
||||
public void Init(int seconds,Action action,bool isEnd = false)
|
||||
{
|
||||
Seconds = seconds;
|
||||
Callback = action;
|
||||
endCount.gameObject.SetActive(isEnd);
|
||||
}
|
||||
|
||||
float timer = 0f;
|
||||
@@ -44,7 +47,8 @@ public class GameRoomCountDownController : PFUIPanel
|
||||
}
|
||||
else
|
||||
{
|
||||
count.text = Seconds.ToString();
|
||||
count.text = Helper.FormatTicks(Seconds);
|
||||
endCount.text = Helper.FormatTicks(Seconds);
|
||||
}
|
||||
Seconds--;
|
||||
timer += 1f;
|
||||
|
||||
@@ -12,6 +12,7 @@ using Assets.Scenes.Ride.Scripts.Model;
|
||||
|
||||
public class GameRoomDetailController : PFUIPanel
|
||||
{
|
||||
public Text versionText;
|
||||
public RawImage Avatar;
|
||||
public Text idText;
|
||||
public Text roomName;
|
||||
@@ -128,6 +129,7 @@ public class GameRoomDetailController : PFUIPanel
|
||||
private void Init()
|
||||
{
|
||||
App.Model = "GameRoom";
|
||||
versionText.text = "V"+App.AppVersion.ToString();
|
||||
MapUDPService.MessageListener = ListenerHandler;
|
||||
GameRoom = App.gameRoomDetail;
|
||||
|
||||
@@ -250,9 +252,6 @@ public class GameRoomDetailController : PFUIPanel
|
||||
|
||||
protected override void OnDisable()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
App.Model = "";
|
||||
}
|
||||
}
|
||||
@@ -59,6 +59,7 @@ public class GameRoomListController : PFUIPanel
|
||||
private GameObject btn40;
|
||||
private GameObject btn50;
|
||||
private GameObject btn60;
|
||||
private GameObject btnMore;
|
||||
|
||||
private GameObject btn2;
|
||||
private GameObject btn3;
|
||||
@@ -172,12 +173,12 @@ public class GameRoomListController : PFUIPanel
|
||||
Total = roomList.GameRoomTotal;
|
||||
ListChanged = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
list = null;
|
||||
Total = 0;
|
||||
ListChanged = true;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// list = null;
|
||||
// Total = 0;
|
||||
// ListChanged = true;
|
||||
//}
|
||||
//查询自己当前创建的房间信息并进入
|
||||
var info = message.Where(c => c.RoomList != null && c.RoomList.Where(o => o.UserId == App.CurrentUser.Id && o.Status == 0).Any()).FirstOrDefault();
|
||||
if (info != null)
|
||||
@@ -210,20 +211,6 @@ public class GameRoomListController : PFUIPanel
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
|
||||
//LOOM中取数据渲染下载当前下载进度
|
||||
var downLoadList = transform.Find("DownLoadList").gameObject;
|
||||
var downloadPanel = transform.Find("DownloadPanel").gameObject;
|
||||
if (!downLoadList.activeSelf && !downloadPanel.activeSelf)
|
||||
{
|
||||
var content = downLoadList.transform.Find("Viewport/Content");
|
||||
foreach (var item in Loom.DownLoadTaskList)
|
||||
{
|
||||
var newtask = Instantiate(_downLoadTask, content);
|
||||
newtask.GetComponent<GameRoomDownloadTask>().Init(0, item.Key, downloadPanel);
|
||||
downLoadList.SetActive(true);
|
||||
}
|
||||
}
|
||||
App.Model = "GameRoom";
|
||||
MapUDPService.MessageListener = ListenerHandler;
|
||||
MapUDPService.SendQueryGameRoomList(App.CurrentUser.Id, pageHelper.PageIndex, pageHelper.PageSize, seachName);
|
||||
@@ -275,6 +262,20 @@ public class GameRoomListController : PFUIPanel
|
||||
CreateClicked = false;
|
||||
UIManager.ShowGameRoomDetailPanel();
|
||||
}
|
||||
|
||||
//LOOM中取数据渲染下载当前下载进度
|
||||
var downLoadList = transform.Find("DownLoadList").gameObject;
|
||||
var downloadPanel = transform.Find("DownloadPanel").gameObject;
|
||||
if (!downLoadList.activeSelf && !downloadPanel.activeSelf)
|
||||
{
|
||||
var content = downLoadList.transform.Find("Viewport/Content");
|
||||
foreach (var item in Loom.DownLoadTaskList)
|
||||
{
|
||||
var newtask = Instantiate(_downLoadTask, content);
|
||||
newtask.GetComponent<GameRoomDownloadTask>().Init(0, item.Key, downloadPanel);
|
||||
downLoadList.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void InitStep1()
|
||||
@@ -290,7 +291,14 @@ public class GameRoomListController : PFUIPanel
|
||||
UIManager.RemoveEvent(scroll, UnityEngine.EventSystems.EventTriggerType.EndDrag);
|
||||
UIManager.AddEvent(scroll, UnityEngine.EventSystems.EventTriggerType.EndDrag, OnEndDrag);
|
||||
}
|
||||
|
||||
var close = transform.Find("MapList/Modal/Close").gameObject;
|
||||
if (close != null)
|
||||
{
|
||||
UIManager.RemoveEvent(close, UnityEngine.EventSystems.EventTriggerType.PointerClick);
|
||||
UIManager.AddEvent(close, UnityEngine.EventSystems.EventTriggerType.PointerClick, (e)=> {
|
||||
mapList.gameObject.SetActive(false);
|
||||
});
|
||||
}
|
||||
distanceOptions = topContainer.Find("distanceOptions");
|
||||
if (distanceOptions != null)
|
||||
{
|
||||
@@ -320,12 +328,12 @@ public class GameRoomListController : PFUIPanel
|
||||
Refresh();
|
||||
});
|
||||
}
|
||||
//是否收藏
|
||||
//是否AR
|
||||
if (favContainer != null)
|
||||
{
|
||||
isEnableAR = true;//默认勾选ar
|
||||
var g = favContainer.Find("Gou").gameObject;
|
||||
g.SetActive(false);
|
||||
isEnableAR = false;
|
||||
g.SetActive(isEnableAR);
|
||||
UIManager.RemoveEvent(favContainer.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick);
|
||||
UIManager.AddEvent(favContainer.gameObject, EventTriggerType.PointerClick, (e)=> {
|
||||
var gou = e.selectedObject.transform.Find("Gou").gameObject;
|
||||
@@ -483,6 +491,7 @@ public class GameRoomListController : PFUIPanel
|
||||
MapUDPService.SendCreateGameRoom(RoomName, selectedRouteId, Roompwd, UIManager.Now.GetDateTime(), CloseTime, Members, Map.AverageGrade, (Map.TotalClimb ?? 0), Map.Distance, Map.Enable3D, Map.EnableAR, Map.Name, Map.FileName, Map.Url, Map.AltitudeGraph);
|
||||
MapList.SetActive(false);
|
||||
CreateClicked = true;
|
||||
Query();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -493,6 +502,7 @@ public class GameRoomListController : PFUIPanel
|
||||
btn40 = right2.transform.Find("btn40").gameObject;
|
||||
btn50 = right2.transform.Find("btn50").gameObject;
|
||||
btn60 = right2.transform.Find("btn60").gameObject;
|
||||
btnMore = right2.transform.Find("btnMore").gameObject;
|
||||
//房间人数
|
||||
btn2 = right2.transform.Find("btn2").gameObject;
|
||||
btn3 = right2.transform.Find("btn3").gameObject;
|
||||
@@ -504,16 +514,19 @@ public class GameRoomListController : PFUIPanel
|
||||
var minInputField = right2.transform.Find("MinInputField").GetComponent<InputField>();
|
||||
var roomNameInputField = right2.transform.Find("RoomNameInputField").GetComponent<InputField>();
|
||||
var passwordInputField = right2.transform.Find("PasswordInputField").GetComponent<InputField>();
|
||||
btnMore.SetActive(true);
|
||||
hourInputField.gameObject.SetActive(false);
|
||||
minInputField.gameObject.SetActive(false);
|
||||
hourInputField.text = "0";
|
||||
minInputField.text = "0";
|
||||
roomNameInputField.text = "";
|
||||
passwordInputField.text = "";
|
||||
RoomName = "";
|
||||
RoomName = App.CurrentUser.Nickname + App.GetLocalString("'s Room");
|
||||
Roompwd = "";
|
||||
roomNameInputField.text = RoomName;
|
||||
passwordInputField.text = "";
|
||||
hourInputField.GetComponent<Outline>().enabled = false;
|
||||
HandleFormInput();
|
||||
HandleCloseTimeBtnClick(0, "");
|
||||
HandleMembersBtnClick(0, "");
|
||||
HandleMembersBtnClick(6, btn6.name);//默认6人
|
||||
HandleCloseTimeBtnClick(30, btn30.name);//默认关门时间30min
|
||||
roomNameInputField.onValueChanged.RemoveAllListeners();
|
||||
//房间名
|
||||
roomNameInputField.onValueChanged.AddListener((e) => {
|
||||
@@ -526,6 +539,7 @@ public class GameRoomListController : PFUIPanel
|
||||
Roompwd = e;
|
||||
HandleFormInput();
|
||||
});
|
||||
|
||||
UIManager.AddEvent(minInputField.gameObject, EventTriggerType.Select, (e) => {
|
||||
hourInputField.GetComponent<Outline>().enabled = true;
|
||||
HandleFormInput();
|
||||
@@ -546,6 +560,12 @@ public class GameRoomListController : PFUIPanel
|
||||
{
|
||||
HandleCloseTimeBtnClick(60, btn60.name);
|
||||
});
|
||||
UIManager.AddEvent(btnMore, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
btnMore.SetActive(false);
|
||||
hourInputField.gameObject.SetActive(true);
|
||||
minInputField.gameObject.SetActive(true);
|
||||
});
|
||||
//小时
|
||||
hourInputField.onValueChanged.RemoveAllListeners();
|
||||
hourInputField.onValueChanged.AddListener((e) => {
|
||||
@@ -560,7 +580,9 @@ public class GameRoomListController : PFUIPanel
|
||||
CloseTime = hours * 60 + mins;
|
||||
HandleCloseTimeBtnClick(CloseTime, minInputField.name);
|
||||
});
|
||||
|
||||
//房间人数
|
||||
|
||||
UIManager.AddEvent(btn2, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
HandleMembersBtnClick(2, btn2.name);
|
||||
@@ -877,7 +899,7 @@ public class GameRoomListController : PFUIPanel
|
||||
next.GetComponent<Button>().interactable = false;
|
||||
next.GetComponent<Button>().enabled = false;
|
||||
HandleStepBtn(previous.name);
|
||||
HandleCloseTimeBtnClick(0, "");
|
||||
HandleCloseTimeBtnClick(30, btn30.name);//默认关门时间30min
|
||||
|
||||
MapList.SetActive(true);
|
||||
}
|
||||
@@ -885,6 +907,7 @@ public class GameRoomListController : PFUIPanel
|
||||
{
|
||||
base.OnDisable();
|
||||
MapUDPService.MessageListener = null;
|
||||
App.Model = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,8 @@ public class LocalRouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
//自动上传
|
||||
try
|
||||
{
|
||||
if (record == null)
|
||||
return;
|
||||
MapInterruptRecordApi service = ConfigHelper.mapInterruptRecordApi;
|
||||
var result = service.Add(record, listFileName);
|
||||
//删除文件
|
||||
|
||||
Reference in new issue
Block a user