自主拍摄视频测试
This commit is contained in:
1 parent
08b92e7e9b
commit
46821d34a2
21 files changed
+2992
-2944
No files matched your search
@@ -26,9 +26,10 @@ public class GameRoomCountDownController : PFUIPanel
|
||||
private bool isSimple { get; set; }
|
||||
public void Init(int seconds,Action action,bool isEnd = false,bool isSimple = false)
|
||||
{
|
||||
stopped = false;
|
||||
Seconds = seconds;
|
||||
Callback = action;
|
||||
endCount.gameObject.SetActive(isEnd);
|
||||
endCount.gameObject.SetActive(false);
|
||||
this.isSimple = isSimple;
|
||||
}
|
||||
|
||||
@@ -36,6 +37,11 @@ public class GameRoomCountDownController : PFUIPanel
|
||||
{
|
||||
base.Close();
|
||||
}
|
||||
private bool stopped;
|
||||
public void Stop()
|
||||
{
|
||||
this.stopped = true;
|
||||
}
|
||||
|
||||
float timer = 0f;
|
||||
private void Update()
|
||||
@@ -47,7 +53,7 @@ public class GameRoomCountDownController : PFUIPanel
|
||||
{
|
||||
Callback?.Invoke();
|
||||
}
|
||||
if (Seconds < 0)
|
||||
if (Seconds < 0 || stopped)
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@ public class GameRoomDetailController : PFUIPanel
|
||||
public GameRoomModel GameRoom { get; set; }
|
||||
public DateTime? StartTime { get; set; }
|
||||
public int Status { get; set; }
|
||||
|
||||
private bool isQuit = false;
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
@@ -82,7 +84,13 @@ public class GameRoomDetailController : PFUIPanel
|
||||
//退出
|
||||
UIManager.AddEvent(quitBtn, UnityEngine.EventSystems.EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
if (Status == 1)
|
||||
{
|
||||
Utils.showToast(gameObject, App.GetLocalString("CancelReadyToQuit"));
|
||||
return;
|
||||
}
|
||||
App.gameRoomDetail = null;
|
||||
isQuit = true;
|
||||
MapUDPService.SendGameRoomKick(GameRoom.RoomId, App.CurrentUser.Id, App.CurrentUser.Id);
|
||||
UIManager.ShowGameRoomListPanel();
|
||||
});
|
||||
@@ -96,24 +104,20 @@ public class GameRoomDetailController : PFUIPanel
|
||||
private bool DataSourceChanged { get; set; }
|
||||
private void ListenerHandler(List<ReceiveMsgModel> message)
|
||||
{
|
||||
try
|
||||
var detail = message.FirstOrDefault();
|
||||
if (detail != null)
|
||||
{
|
||||
var detail = message.FirstOrDefault();
|
||||
if (detail != null)
|
||||
if (detail.RoomList == null)
|
||||
{
|
||||
if (detail.RoomList != null)
|
||||
{
|
||||
GameRoom = detail.RoomList.Where(c => c.RoomId == GameRoom.RoomId).FirstOrDefault();
|
||||
if (GameRoom != null)
|
||||
{
|
||||
DataSourceChanged = true;
|
||||
}
|
||||
}
|
||||
DataSourceChanged = true;
|
||||
GameRoom = null;
|
||||
return;
|
||||
}
|
||||
GameRoom = detail.RoomList.Where(c => c.RoomId == GameRoom.RoomId).FirstOrDefault();
|
||||
if (GameRoom != null)
|
||||
{
|
||||
DataSourceChanged = true;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
float timer = 0f;
|
||||
@@ -128,6 +132,7 @@ public class GameRoomDetailController : PFUIPanel
|
||||
}
|
||||
private void Init()
|
||||
{
|
||||
DataSourceChanged = false;
|
||||
App.Model = "GameRoom";
|
||||
versionText.text = "V"+App.AppVersion.ToString();
|
||||
MapUDPService.MessageListener = ListenerHandler;
|
||||
@@ -180,6 +185,13 @@ public class GameRoomDetailController : PFUIPanel
|
||||
{
|
||||
if (DataSourceChanged)
|
||||
{
|
||||
//房间被销毁了返回房间列表
|
||||
if (GameRoom == null)
|
||||
{
|
||||
Debug.Log("GameRoom == null");
|
||||
UIManager.ShowGameRoomListPanel();
|
||||
return;
|
||||
}
|
||||
var playerList = FindObjectsOfType<GameRoomPlayerPanel>();
|
||||
var list = GameRoom.RoomPlayerList;
|
||||
//自己是否是房主
|
||||
@@ -224,11 +236,14 @@ public class GameRoomDetailController : PFUIPanel
|
||||
item.ShowInviteModal();
|
||||
}
|
||||
var myself = list.Where(c => c.UserId == App.CurrentUser.Id).FirstOrDefault();
|
||||
//被移除房间 or 掉线
|
||||
//被移除房间/掉线
|
||||
if (myself == null)
|
||||
{
|
||||
Utils.showToast(gameObject, App.GetLocalString("you have been kicked out of the room"));
|
||||
UIManager.ShowGameRoomListPanel();
|
||||
if (!isQuit)
|
||||
{
|
||||
Utils.showToast(gameObject, App.GetLocalString("you have been kicked out of the room"));
|
||||
UIManager.ShowGameRoomListPanel();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,9 +330,10 @@ public class GameRoomListController : PFUIPanel
|
||||
//是否是3d
|
||||
if (tdContainer != null)
|
||||
{
|
||||
tdContainer.gameObject.SetActive(false);
|
||||
var g = tdContainer.Find("Gou").gameObject;
|
||||
g.SetActive(false);
|
||||
is3d = false;
|
||||
is3d = true;
|
||||
UIManager.RemoveEvent(tdContainer.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick);
|
||||
UIManager.AddEvent(tdContainer.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user