| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | |
| | | [SerializeField] Button m_DropOutBtn; |
| | | [SerializeField] Text m_DropOutBtnText;
|
| | |
|
| | | [SerializeField] Transform m_Normal; |
| | | [SerializeField] Transform m_BrokenLine; |
| | | [SerializeField] GameObject m_Normal; |
| | | [SerializeField] GameObject m_RoundWinOne; |
| | | [SerializeField] Text m_m_RoundWinOneTxt;
|
| | | [SerializeField] GameObject m_RoundWinTwo; |
| | | [SerializeField] Text m_m_RoundWinTwo;
|
| | | [SerializeField] GameObject m_RoundWinThree; |
| | | [SerializeField] Text m_m_RoundWinThree;
|
| | | [SerializeField] GameObject m_SessionObj; |
| | | [SerializeField] Text m_SessionTxt; |
| | | [SerializeField] GameObject m_SegmentObj;
|
| | | [SerializeField] Text m_SegmentTxt1; |
| | | [SerializeField] Text m_SegmentTxt2; |
| | | |
| | | [SerializeField] Text m_SorceText; |
| | | |
| | | |
| | | |
| | | [SerializeField] GameObject m_BrokenLine; |
| | | [SerializeField] Text m_BrokenLineText; |
| | | [SerializeField] GameObject m_SessionObj1; |
| | | [SerializeField] Text m_SessionTxt1; |
| | | [SerializeField] GameObject m_SegmentObj1; |
| | | [SerializeField] Text m_Segment_Txt1;
|
| | | [SerializeField] Text m_Segment_Txt2; |
| | | [SerializeField] Text m_Sorce_Txt; |
| | | #region Built-in |
| | | CrossServerOneVsOneModel crossServerModel { get { return ModelCenter.Instance.GetModel<CrossServerOneVsOneModel>(); } }
|
| | | DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
| | | m_BackFailure.SetActive(true);
|
| | | m_BackWin.SetActive(false);
|
| | | } |
| | | if (crossServerModel.pkResultInfo.OverType == 0)
|
| | | {
|
| | | m_Normal.SetActive(true);
|
| | | m_BrokenLine.SetActive(false);
|
| | | SetNormal();
|
| | | }
|
| | | else
|
| | | {
|
| | | SetBrokenLine();
|
| | | m_Normal.SetActive(false);
|
| | | m_BrokenLine.SetActive(true);
|
| | | } |
| | | |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | |
| | | #endregion |
| | | private void ExitDungeon()
|
| | | {
|
| | | model.ExitCurrentDungeon();
|
| | | CrossServerRewardModel.ExitCrossRealm();
|
| | | CloseClick();
|
| | | } |
| | | |
| | | private void SetNormal()
|
| | | {
|
| | | m_RoundWinOne.SetActive(false);
|
| | | m_RoundWinTwo.SetActive(false);
|
| | | m_RoundWinThree.SetActive(false);
|
| | | m_SessionObj.SetActive(false);
|
| | | m_SegmentObj.SetActive(false);
|
| | | int PlayerId = (int)PlayerDatas.Instance.baseData.PlayerID;
|
| | | for (int i = 0; i < crossServerModel.pkResultInfo.RoundCount; i++)
|
| | | {
|
| | | int winID =(int)crossServerModel.pkResultInfo.RoundWinnerIDs[i];
|
| | | if (i == 0)
|
| | | {
|
| | | m_RoundWinOne.SetActive(true);
|
| | | if (winID == PlayerId)
|
| | | {
|
| | | m_m_RoundWinOneTxt.text = Language.Get("CrossServer113");
|
| | | m_m_RoundWinOneTxt.color = new Color32(255,239,71,255);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_m_RoundWinOneTxt.text = Language.Get("CrossServer114");
|
| | | m_m_RoundWinOneTxt.color = new Color32(255, 244, 205, 255);
|
| | | }
|
| | | }
|
| | | else if (i == 1)
|
| | | {
|
| | | m_RoundWinTwo.SetActive(true);
|
| | | if (winID == PlayerId)
|
| | | {
|
| | | m_m_RoundWinTwo.text = Language.Get("CrossServer113");
|
| | | m_m_RoundWinTwo.color = new Color32(255, 239, 71, 255);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_m_RoundWinTwo.text = Language.Get("CrossServer114");
|
| | | m_m_RoundWinTwo.color = new Color32(255, 244, 205, 255);
|
| | | }
|
| | | }
|
| | | else if (i == 2)
|
| | | {
|
| | | m_RoundWinThree.SetActive(true);
|
| | | if (winID == PlayerId)
|
| | | {
|
| | | m_m_RoundWinThree.text = Language.Get("CrossServer113");
|
| | | m_m_RoundWinThree.color = new Color32(255, 239, 71, 255);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_m_RoundWinThree.text = Language.Get("CrossServer114");
|
| | | m_m_RoundWinThree.color = new Color32(255, 244, 205, 255);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | if (crossServerModel.pkResultInfo.WinStreak > 1)
|
| | | {
|
| | | m_SessionObj.SetActive(true);
|
| | | m_SessionTxt.text = crossServerModel.pkResultInfo.WinStreak.ToString();
|
| | | }
|
| | | if (crossServerModel.pkResultInfo.DanLV != CrossServerRewardModel.PkDanLvNow)
|
| | | {
|
| | | var config1 = Config.Instance.Get<CrossServerArenaConfig>(CrossServerRewardModel.PkDanLvNow);
|
| | | m_SegmentObj.SetActive(true);
|
| | | m_SegmentTxt1.text = config1.Name;
|
| | | var config2 = Config.Instance.Get<CrossServerArenaConfig>(crossServerModel.pkResultInfo.DanLV);
|
| | | m_SegmentTxt2.text = config2.Name;
|
| | | |
| | | }
|
| | | m_SorceText.text = crossServerModel.pkResultInfo.CurScore + "(" + crossServerModel.pkResultInfo.AddScore + ")";
|
| | | } |
| | | |
| | | private void SetBrokenLine()
|
| | | {
|
| | | int WinnerID = crossServerModel.pkResultInfo.WinnerID; |
| | | int playerID = (int)PlayerDatas.Instance.baseData.PlayerID;
|
| | | if (WinnerID == playerID)
|
| | | {
|
| | | m_BrokenLineText.text = "对手离开战斗";
|
| | | }
|
| | | else
|
| | | {
|
| | | m_BrokenLineText.text = "重新连接超时";
|
| | | }
|
| | | if (crossServerModel.pkResultInfo.WinStreak > 1)
|
| | | {
|
| | | m_SessionObj1.SetActive(true);
|
| | | m_SessionTxt1.text = crossServerModel.pkResultInfo.WinStreak.ToString();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_SessionObj1.SetActive(false);
|
| | | }
|
| | | if (crossServerModel.pkResultInfo.DanLV != CrossServerRewardModel.PkDanLvNow)
|
| | | {
|
| | | var config1 = Config.Instance.Get<CrossServerArenaConfig>(CrossServerRewardModel.PkDanLvNow);
|
| | | m_SegmentObj1.SetActive(true);
|
| | | m_Segment_Txt1.text = config1.Name;
|
| | | var config2 = Config.Instance.Get<CrossServerArenaConfig>(crossServerModel.pkResultInfo.DanLV);
|
| | | m_Segment_Txt2.text = config2.Name;
|
| | | m_SorceText.text = crossServerModel.pkResultInfo.CurScore + "(" + crossServerModel.pkResultInfo.AddScore + ")";
|
| | | }
|
| | | else
|
| | | {
|
| | | m_SegmentObj1.SetActive(false);
|
| | | }
|
| | | m_Sorce_Txt.text = crossServerModel.pkResultInfo.CurScore + "(" + crossServerModel.pkResultInfo.AddScore + ")";
|
| | | } |
| | | } |
| | | |
| | | } |