| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class FightingPKWin : Window |
| | | {
|
| | |
| | | [SerializeField] Text m_ScoreText1;
|
| | | [SerializeField] Text m_ScoreText2;
|
| | | [SerializeField] Text m_CountdownText;
|
| | |
|
| | |
|
| | | public float UpperAndLower = 17f;
|
| | | public float ItemHeight = 135f;
|
| | | public float MaxHeight = 422f;
|
| | | private ScrollRect _ScrollRect1;
|
| | | private ScrollRect _ScrollRect2;
|
| | | [SerializeField] ScrollerController m_ScrollerController1;
|
| | | [SerializeField] Transform Viewport1;
|
| | |
|
| | | [SerializeField] ScrollerController m_ScrollerController2;
|
| | | [SerializeField] Transform Viewport2;
|
| | |
|
| | | private List<int> _MyBuffSortList = new List<int>();//自身BUff列表
|
| | | private List<int> _OpponentBuffSortList = new List<int>();//对手buff列表
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | DateTime dungeonEndTime; |
| | | DateTime dungeonEndTime;
|
| | | PlayerBuffDatas m_BuffModel;
|
| | | PlayerBuffDatas Buffmodel { get { return m_BuffModel ?? (m_BuffModel = ModelCenter.Instance.GetModel<PlayerBuffDatas>()); } }
|
| | |
|
| | | private int positionType = 1; |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | {
|
| | | _ScrollRect1 = Viewport1.GetComponent<ScrollRect>();
|
| | | _ScrollRect2 = Viewport2.GetComponent<ScrollRect>();
|
| | | m_ScrollerController1.OnRefreshCell += OnRefreshGridCell1;
|
| | | m_ScrollerController2.OnRefreshCell += OnRefreshGridCell2; |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | protected override void AddListeners() |
| | | { |
| | | m_AutoBtn.AddListener(AutoButton); |
| | | m_RoleInformation1.BuffButton.AddListener(myBuffList); |
| | | m_RoleInformation2.BuffButton.AddListener(opponentBuffList); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | //-----------自己的信息 |
| | | CrossServerRewardModel.PkDanLvNow = CrossServerOneVsOnePlayerInfo.Instance.DanLV; |
| | | m_RoleInformation1.SetHeroHead(CrossServerLogin.Instance.oneVsOnePlayerData.myJob, 0); |
| | | string PlayerName = UIHelper.ServerStringTrim(CrossServerLogin.Instance.oneVsOnePlayerData.myName); |
| | | m_RoleInformation1.SetHeroLvAndName((int)PlayerDatas.Instance.baseData.LV, PlayerName); |
| | | m_RoleInformation1.SetHeroHP(PlayerDatas.Instance.extersion.MaxHP, (int)PlayerDatas.Instance.baseData.HP); |
| | | m_RoleInformation1.SetShieldNumber(PlayerDatas.Instance.extersion.MaxProDef, (int)PlayerDatas.Instance.baseData.ExAttr4);
|
| | | CrossServerRewardModel.PkDanLvNow = CrossServerOneVsOnePlayerInfo.Instance.DanLV;
|
| | | PlaceOfBirth(positionType);//从出生位置设置信息 |
| | | |
| | | SetScoreText();
|
| | | BuffScheduling();//buff排序
|
| | | |
| | | |
| | | OnCreateGridLineCell(m_ScrollerController1);
|
| | | OnCreateGridLineCel2(m_ScrollerController2);
|
| | | IsShowMyBuffBtn();
|
| | | IsShowOpponentBuffBtn();
|
| | | |
| | | }
|
| | |
|
| | | //------------------------------------//对手信息
|
| | | int job = CrossServerLogin.Instance.oneVsOnePlayerData.opponentJob;
|
| | | m_RoleInformation2.SetHeroHead(job,0);
|
| | | string OpponentName = UIHelper.ServerStringTrim(CrossServerLogin.Instance.oneVsOnePlayerData.opponentName);
|
| | | m_RoleInformation2.SetHeroLvAndName((int)CrossServerLogin.Instance.oneVsOnePlayerData.opponentLevel, OpponentName);
|
| | | m_RoleInformation2.SetHeroHP(CrossServerLogin.Instance.oneVsOnePlayerData.opponentMaxHp, CrossServerLogin.Instance.oneVsOnePlayerData.opponentMaxHp);
|
| | | m_RoleInformation1.SetShieldNumber(1, 1); |
| | | |
| | | SetScoreText(); |
| | |
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | Viewport1.gameObject.SetActive(false); |
| | | Viewport2.gameObject.SetActive(false);
|
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//数据的刷新(h0418)
|
| | |
| | | HeroBehaviour.OnStopHandupAI += OnHeroHandupAIStopPassive;
|
| | | HeroBehaviour.OnStartHandupAI += OnHeroHandupAIStarted;
|
| | | dungeonModel.dungeonCoolDownEvent += DungeonCoolDownEvent; |
| | | dungeonModel.updateMissionEvent += UpdateMissionEvent; |
| | | dungeonModel.updateMissionEvent += UpdateMissionEvent;
|
| | | PlayerBuffDatas.Even_ObjAddBuf += AddBuff;
|
| | | PlayerBuffDatas.Even_ObjDelBuff += DelBuff; |
| | | PlayerBuffDatas.BuffUpdateEvent += BuffUpdateEvent; |
| | | }
|
| | |
|
| | | |
| | |
|
| | |
|
| | | protected override void OnPreClose() |
| | | {
|
| | |
| | | HeroBehaviour.OnStopHandupAI -= OnHeroHandupAIStopPassive;
|
| | | HeroBehaviour.OnStartHandupAI -= OnHeroHandupAIStarted;
|
| | | dungeonModel.dungeonCoolDownEvent -= DungeonCoolDownEvent;
|
| | | dungeonModel.updateMissionEvent -= UpdateMissionEvent; |
| | | dungeonModel.updateMissionEvent -= UpdateMissionEvent;
|
| | | PlayerBuffDatas.Even_ObjAddBuf -= AddBuff;
|
| | | PlayerBuffDatas.Even_ObjDelBuff -= DelBuff;
|
| | | PlayerBuffDatas.BuffUpdateEvent -= BuffUpdateEvent; |
| | | }
|
| | |
|
| | | |
| | |
|
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | |
| | | var surplus = dungeonEndTime - DateTime.Now;
|
| | | m_CountdownText.text = TimeUtility.SecondsToHMSCHSRetain((int)surplus.TotalSeconds, false, false);
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | | #endregion |
| | | private void DelBuff()
|
| | | {
|
| | | BuffScheduling();
|
| | | UpdateControllerPosition();
|
| | | IsShowMyBuffBtn();
|
| | | if (positionType == 1)
|
| | | {
|
| | | OnCreateGridLineCell(m_ScrollerController1);
|
| | | }
|
| | | else
|
| | | {
|
| | | OnCreateGridLineCel2(m_ScrollerController2);
|
| | | }
|
| | | }
|
| | |
|
| | | private void AddBuff()
|
| | | {
|
| | | BuffScheduling();
|
| | | UpdateControllerPosition();
|
| | | IsShowMyBuffBtn();
|
| | | if (positionType == 1)
|
| | | {
|
| | | OnCreateGridLineCell(m_ScrollerController1);
|
| | | }
|
| | | else
|
| | | {
|
| | | OnCreateGridLineCel2(m_ScrollerController2);
|
| | | }
|
| | | }
|
| | | private void BuffUpdateEvent(int playerID)
|
| | | {
|
| | | int opponentPlayerId = CrossServerLogin.Instance.oneVsOnePlayerData.opponentPlayerId;
|
| | | if (playerID == opponentPlayerId)
|
| | | {
|
| | | GetopponentBuff();
|
| | | UpdateControllerPositionOppoent();
|
| | | IsShowOpponentBuffBtn();
|
| | | if (positionType == 1)
|
| | | {
|
| | | OnCreateGridLineCel2(m_ScrollerController2);
|
| | | }
|
| | | else
|
| | | {
|
| | | OnCreateGridLineCell(m_ScrollerController1);
|
| | | }
|
| | | }
|
| | | } |
| | | private void DungeonCoolDownEvent(DungeonCoolDownType type)
|
| | | {
|
| | | if (type == DungeonCoolDownType.TowerTake)
|
| | |
| | | {
|
| | | switch (_tCDBPlayerRefresh)
|
| | | {
|
| | | case PlayerDataRefresh.FightPower://战斗力的刷新83
|
| | | break;
|
| | | case PlayerDataRefresh.LV://等级的刷新8
|
| | | string PlayerName = UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName);
|
| | | m_RoleInformation1.SetHeroLvAndName((int)PlayerDatas.Instance.baseData.LV, PlayerName);
|
| | | break;
|
| | | case PlayerDataRefresh.MaxHP://最大血量的刷新28
|
| | | case PlayerDataRefresh.HP://当前血量29
|
| | | m_RoleInformation1.SetHeroHP(PlayerDatas.Instance.extersion.MaxHP, (int)PlayerDatas.Instance.baseData.HP);
|
| | | break;
|
| | | case PlayerDataRefresh.ExAttr4://当前护盾值
|
| | | case PlayerDataRefresh.MaxProDef://最大护盾值
|
| | | m_RoleInformation1.SetShieldNumber(PlayerDatas.Instance.extersion.MaxProDef, (int)PlayerDatas.Instance.baseData.ExAttr4);
|
| | | PlaceOfBirthUpdate(positionType);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | private void OnRefreshPlayerLifeBar(uint _instanceId, ulong _hp, ulong _maxHp)
|
| | | {
|
| | | m_RoleInformation2.SetHeroHP((int)_maxHp,(int)_hp);
|
| | | if (positionType == 1)
|
| | | {
|
| | | m_RoleInformation2.SetHeroHP((int)_maxHp, (int)_hp);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RoleInformation1.SetHeroHP((int)_maxHp, (int)_hp);
|
| | | }
|
| | |
|
| | | }
|
| | | private void OnHeroHandupAIStopPassive()
|
| | | {
|
| | |
| | | {
|
| | | if (!_hero.aiHandler.IsAuto())
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen<ExperienceOpenWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<ExperienceOpenWin>(true);
|
| | | }
|
| | | _hero.Behaviour.StartHandupAI();
|
| | | }
|
| | | else
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<ExperienceOpenWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<ExperienceOpenWin>();
|
| | | }
|
| | |
|
| | | _hero.Behaviour.StopHandupAI();
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | } |
| | | m_ScoreText1.text = myWin.ToString();
|
| | | m_ScoreText2.text = youWin.ToString();
|
| | | |
| | | }
|
| | | if (positionType == 1)
|
| | | {
|
| | | m_ScoreText1.text = myWin.ToString();
|
| | | m_ScoreText2.text = youWin.ToString();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ScoreText2.text = myWin.ToString();
|
| | | m_ScoreText1.text = youWin.ToString();
|
| | | }
|
| | | }
|
| | | private void myBuffList()
|
| | | {
|
| | | Viewport1.gameObject.SetActive(true);
|
| | | } |
| | | |
| | | private void opponentBuffList()
|
| | | {
|
| | | Viewport2.gameObject.SetActive(true);
|
| | | }
|
| | | private void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | |
|
| | | if (positionType == 1)
|
| | | {
|
| | | for (int i = 0; i < _MyBuffSortList.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, _MyBuffSortList[i]);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | for (int i = 0; i < _OpponentBuffSortList.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, _OpponentBuffSortList[i]);
|
| | | }
|
| | | }
|
| | |
|
| | | gridCtrl.Restart();
|
| | | }
|
| | | private void OnCreateGridLineCel2(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | |
|
| | | if (positionType == 1)
|
| | | {
|
| | | for (int i = 0; i < _OpponentBuffSortList.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, _OpponentBuffSortList[i]);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | for (int i = 0; i < _MyBuffSortList.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, _MyBuffSortList[i]);
|
| | | }
|
| | |
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | }
|
| | | private void OnRefreshGridCell1(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | int _index = cell.index;
|
| | | BuffBGMScripts _buffBGM = cell.GetComponent<BuffBGMScripts>();
|
| | | var skillconfig = Config.Instance.Get<SkillConfig>(_index);
|
| | | _buffBGM.b_BuffIcon.SetSprite(skillconfig.IconName);
|
| | | _buffBGM.b_BuffName.text = skillconfig.SkillName;
|
| | | _buffBGM.b_BuffContent.text = skillconfig.BuffDescription;
|
| | | _buffBGM.b_BuffTime.gameObject.SetActive(false);
|
| | | _buffBGM.BiBuffText.gameObject.SetActive(false);
|
| | | _buffBGM._OnOff = false;
|
| | |
|
| | | }
|
| | | private void OnRefreshGridCell2(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | int _index = cell.index;
|
| | | BuffBGMScripts _buffBGM = cell.GetComponent<BuffBGMScripts>();
|
| | | var skillconfig = Config.Instance.Get<SkillConfig>(_index);
|
| | | int _INList = _MyBuffSortList[_index];
|
| | | _buffBGM.b_BuffIcon.SetSprite(skillconfig.IconName);
|
| | | _buffBGM.b_BuffName.text = skillconfig.SkillName;
|
| | | _buffBGM.b_BuffContent.text = skillconfig.BuffDescription;
|
| | | _buffBGM.b_BuffTime.gameObject.SetActive(false);
|
| | | _buffBGM.BiBuffText.gameObject.SetActive(false);
|
| | | _buffBGM._OnOff = false;
|
| | | } |
| | | void UpdateControllerPosition()
|
| | | {
|
| | | if (_MyBuffSortList.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (_MyBuffSortList.Count * ItemHeight >= MaxHeight)
|
| | | {
|
| | | if (positionType == 1)
|
| | | {
|
| | | _ScrollRect1.vertical = true;
|
| | | (Viewport1 as RectTransform).sizeDelta = (Viewport1 as RectTransform).sizeDelta.SetY(MaxHeight + UpperAndLower);
|
| | | }
|
| | | else
|
| | | {
|
| | | _ScrollRect2.vertical = true;
|
| | | (Viewport2 as RectTransform).sizeDelta = (Viewport2 as RectTransform).sizeDelta.SetY(MaxHeight + UpperAndLower);
|
| | | } |
| | | }
|
| | | else
|
| | | {
|
| | | if (positionType == 1)
|
| | | {
|
| | | _ScrollRect1.vertical = false;
|
| | | (Viewport1 as RectTransform).sizeDelta = (Viewport1 as RectTransform).sizeDelta.SetY(_MyBuffSortList.Count * ItemHeight + UpperAndLower);
|
| | | }
|
| | | else
|
| | | {
|
| | | _ScrollRect2.vertical = false;
|
| | | (Viewport2 as RectTransform).sizeDelta = (Viewport2 as RectTransform).sizeDelta.SetY(_MyBuffSortList.Count * ItemHeight + UpperAndLower);
|
| | | } |
| | | }
|
| | | }
|
| | | void UpdateControllerPositionOppoent()
|
| | | {
|
| | | if (_OpponentBuffSortList.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (_OpponentBuffSortList.Count * ItemHeight >= MaxHeight)
|
| | | {
|
| | | if (positionType == 1)
|
| | | {
|
| | | _ScrollRect2.vertical = true;
|
| | | (Viewport2 as RectTransform).sizeDelta = (Viewport2 as RectTransform).sizeDelta.SetY(MaxHeight + UpperAndLower);
|
| | | }
|
| | | else
|
| | | {
|
| | | _ScrollRect1.vertical = true;
|
| | | (Viewport1 as RectTransform).sizeDelta = (Viewport1 as RectTransform).sizeDelta.SetY(MaxHeight + UpperAndLower);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (positionType == 1)
|
| | | {
|
| | | _ScrollRect2.vertical = false;
|
| | | (Viewport2 as RectTransform).sizeDelta = (Viewport2 as RectTransform).sizeDelta.SetY(_OpponentBuffSortList.Count * ItemHeight + UpperAndLower);
|
| | | }
|
| | | else
|
| | | {
|
| | | _ScrollRect1.vertical = false;
|
| | | (Viewport1 as RectTransform).sizeDelta = (Viewport1 as RectTransform).sizeDelta.SetY(_OpponentBuffSortList.Count * ItemHeight + UpperAndLower);
|
| | | }
|
| | | }
|
| | | } |
| | | void BuffScheduling()//buff排序
|
| | | {
|
| | | _MyBuffSortList.Clear();
|
| | | foreach (int key in Buffmodel._BuffDic.Keys)
|
| | | {
|
| | | _MyBuffSortList.Add(key);
|
| | | }
|
| | |
|
| | | } |
| | | private void IsShowMyBuffBtn()
|
| | | {
|
| | | if (_MyBuffSortList.Count > 0)
|
| | | {
|
| | | if (positionType == 1)
|
| | | {
|
| | | m_RoleInformation1.BuffButton.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RoleInformation2.BuffButton.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (positionType == 1)
|
| | | {
|
| | | m_RoleInformation1.BuffButton.gameObject.SetActive(false);
|
| | | Viewport1.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RoleInformation2.BuffButton.gameObject.SetActive(false);
|
| | | Viewport2.gameObject.SetActive(false);
|
| | | }
|
| | | UpdateControllerPosition();
|
| | | }
|
| | | if (positionType == 1)
|
| | | {
|
| | | m_RoleInformation1.BuffNumber.text = _MyBuffSortList.Count.ToString();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RoleInformation2.BuffNumber.text = _MyBuffSortList.Count.ToString();
|
| | | }
|
| | | }
|
| | | private void IsShowOpponentBuffBtn()
|
| | | {
|
| | | if (_OpponentBuffSortList.Count > 0)
|
| | | {
|
| | | if (positionType == 1)
|
| | | {
|
| | | m_RoleInformation2.BuffButton.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RoleInformation1.BuffButton.gameObject.SetActive(true);
|
| | | }
|
| | | UpdateControllerPositionOppoent();
|
| | | }
|
| | | else
|
| | | {
|
| | | if (positionType == 1)
|
| | | {
|
| | | m_RoleInformation2.BuffButton.gameObject.SetActive(false);
|
| | | Viewport2.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RoleInformation1.BuffButton.gameObject.SetActive(false);
|
| | | Viewport1.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | if (positionType == 1)
|
| | | {
|
| | | m_RoleInformation2.BuffNumber.text = _MyBuffSortList.Count.ToString();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RoleInformation1.BuffNumber.text = _MyBuffSortList.Count.ToString();
|
| | | }
|
| | | } |
| | | private void PlaceOfBirth(int type)//关于出生点设置位置信息
|
| | | {
|
| | | if (type == 1)//左
|
| | | {
|
| | | //-----------自己的信息
|
| | | m_RoleInformation1.SetHeroHead(CrossServerLogin.Instance.oneVsOnePlayerData.myJob, 0);
|
| | | string PlayerName = UIHelper.ServerStringTrim(CrossServerLogin.Instance.oneVsOnePlayerData.myName);
|
| | | m_RoleInformation1.SetHeroLvAndName((int)PlayerDatas.Instance.baseData.LV, PlayerName);
|
| | | m_RoleInformation1.SetHeroHP(PlayerDatas.Instance.extersion.MaxHP, PlayerDatas.Instance.extersion.MaxHP);
|
| | | m_RoleInformation1.SetShieldNumber(PlayerDatas.Instance.extersion.MaxProDef, (int)PlayerDatas.Instance.baseData.ExAttr4);
|
| | |
|
| | | //------------------------------------//对手信息
|
| | | int job = CrossServerLogin.Instance.oneVsOnePlayerData.opponentJob;
|
| | | m_RoleInformation2.SetHeroHead(job, 0);
|
| | | string OpponentName = UIHelper.ServerStringTrim(CrossServerLogin.Instance.oneVsOnePlayerData.opponentName);
|
| | | m_RoleInformation2.SetHeroLvAndName((int)CrossServerLogin.Instance.oneVsOnePlayerData.opponentLevel, OpponentName);
|
| | | m_RoleInformation2.SetHeroHP(CrossServerLogin.Instance.oneVsOnePlayerData.opponentMaxHp, CrossServerLogin.Instance.oneVsOnePlayerData.opponentMaxHp);
|
| | | m_RoleInformation2.SetShieldNumber(1, 1);
|
| | | }
|
| | | else//右
|
| | | {
|
| | | //-----------自己的信息
|
| | | m_RoleInformation2.SetHeroHead(CrossServerLogin.Instance.oneVsOnePlayerData.myJob, 0);
|
| | | string PlayerName = UIHelper.ServerStringTrim(CrossServerLogin.Instance.oneVsOnePlayerData.myName);
|
| | | m_RoleInformation2.SetHeroLvAndName((int)PlayerDatas.Instance.baseData.LV, PlayerName);
|
| | | m_RoleInformation2.SetHeroHP(PlayerDatas.Instance.extersion.MaxHP, PlayerDatas.Instance.extersion.MaxHP);
|
| | | m_RoleInformation2.SetShieldNumber(PlayerDatas.Instance.extersion.MaxProDef, (int)PlayerDatas.Instance.baseData.ExAttr4);
|
| | |
|
| | | //------------------------------------//对手信息
|
| | | int job = CrossServerLogin.Instance.oneVsOnePlayerData.opponentJob;
|
| | | m_RoleInformation1.SetHeroHead(job, 0);
|
| | | string OpponentName = UIHelper.ServerStringTrim(CrossServerLogin.Instance.oneVsOnePlayerData.opponentName);
|
| | | m_RoleInformation1.SetHeroLvAndName((int)CrossServerLogin.Instance.oneVsOnePlayerData.opponentLevel, OpponentName);
|
| | | m_RoleInformation1.SetHeroHP(CrossServerLogin.Instance.oneVsOnePlayerData.opponentMaxHp, CrossServerLogin.Instance.oneVsOnePlayerData.opponentMaxHp);
|
| | | m_RoleInformation1.SetShieldNumber(1, 1);
|
| | | }
|
| | | }
|
| | |
|
| | | private void PlaceOfBirthUpdate(int type)//自身玩家属性刷新
|
| | | {
|
| | | if (type == 1)
|
| | | {
|
| | | string PlayerName = UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName);
|
| | | m_RoleInformation1.SetHeroLvAndName((int)PlayerDatas.Instance.baseData.LV, PlayerName);
|
| | | m_RoleInformation1.SetHeroHP(PlayerDatas.Instance.extersion.MaxHP, (int)PlayerDatas.Instance.baseData.HP);
|
| | | m_RoleInformation1.SetShieldNumber(PlayerDatas.Instance.extersion.MaxProDef, (int)PlayerDatas.Instance.baseData.ExAttr4);
|
| | | }
|
| | | else
|
| | | {
|
| | | string PlayerName = UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName);
|
| | | m_RoleInformation2.SetHeroLvAndName((int)PlayerDatas.Instance.baseData.LV, PlayerName);
|
| | | m_RoleInformation2.SetHeroHP(PlayerDatas.Instance.extersion.MaxHP, (int)PlayerDatas.Instance.baseData.HP);
|
| | | m_RoleInformation2.SetShieldNumber(PlayerDatas.Instance.extersion.MaxProDef, (int)PlayerDatas.Instance.baseData.ExAttr4);
|
| | | }
|
| | | }
|
| | |
|
| | | private void GetopponentBuff()//获取对手身上的Buff
|
| | | {
|
| | | List<int> buffIds = new List<int>();
|
| | | StatusMgr.Instance.GetBuffIds((uint)CrossServerLogin.Instance.oneVsOnePlayerData.opponentPlayerId, ref buffIds);
|
| | | if (buffIds.Count > 0)
|
| | | {
|
| | | _OpponentBuffSortList.Clear();
|
| | | for (int i = 0; i < buffIds.Count; i++)
|
| | | {
|
| | | _OpponentBuffSortList.Add(buffIds[i]);
|
| | | }
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |